Esempio n. 1
0
    def decrypt(self, nonce, data, associated_data):
        if associated_data is None:
            associated_data = b""

        self._check_params(nonce, data, associated_data)
        return aead._decrypt(backend, self, nonce, data, associated_data,
                             self._tag_length)
Esempio n. 2
0
File: aead.py Progetto: reidefe/foxy
    def decrypt(self, nonce: bytes, data: bytes,
                associated_data: typing.Optional[bytes]) -> bytes:
        if associated_data is None:
            associated_data = b""

        self._check_params(nonce, data, associated_data)
        return aead._decrypt(backend, self, nonce, data, associated_data, 16)
Esempio n. 3
0
    def decrypt(self, nonce, data, associated_data):
        if associated_data is None:
            associated_data = b""

        self._check_params(nonce, data, associated_data)
        return aead._decrypt(
            backend, self, nonce, data, associated_data, self._tag_length
        )
Esempio n. 4
0
    def decrypt(
        self,
        data: bytes,
        associated_data: typing.Optional[typing.List[bytes]],
    ) -> bytes:
        if associated_data is None:
            associated_data = []

        self._check_params(data, associated_data)

        return aead._decrypt(backend, self, b"", data, associated_data, 16)