GitHub

Implementation

API reference for Implementation.

An in-process AEAD: encrypt(key, nonce, plaintext, aad) gives the ciphertext and tag; decrypt gives the plaintext, or None when the tag does not match.

Attributes

AttributeTypeDescription
encryptCallable[[bytes, bytes, bytes, bytes], bytes]
decryptCallable[[bytes, bytes, bytes, bytes], bytes | None]

Functions

__init__

__init__(encrypt, decrypt) -> None
ParameterTypeDescription
encryptCallable[[bytes, bytes, bytes, bytes], bytes]
decryptCallable[[bytes, bytes, bytes, bytes], bytes | None]