AEADMode

Interface for AEAD (Authenticated Encryption with Associated Data) modes. These modes provide both encryption and message authentication, and can authenticate additional per-message data which is not included in the ciphertext (for instance a sequence number).

static if(BOTAN_HAS_AEAD_CCM || BOTAN_HAS_AEAD_EAX || BOTAN_HAS_AEAD_GCM || BOTAN_HAS_AEAD_SIV || BOTAN_HAS_AEAD_OCB || BOTAN_HAS_AEAD_CHACHA20_POLY1305)
class AEADMode : CipherMode , Transformation {}

Members

Functions

authenticated
bool authenticated()
Undocumented in source. Be warned that the author may not have intended to support it.
defaultNonceLength
size_t defaultNonceLength()

Default AEAD nonce size (a commonly supported value among AEAD modes, and large enough that random collisions are unlikely).

setAssociatedData
void setAssociatedData(const(ubyte)* ad, size_t ad_len)

Set associated data that is not included in the ciphertext but that should be authenticated. Must be called after setKey and before finish.

setAssociatedDataVec
void setAssociatedDataVec(Vector!(ubyte, Alloc) ad)
Undocumented in source. Be warned that the author may not have intended to support it.
tagSize
size_t tagSize()

Return the size of the authentication tag used (in bytes)

Inherited Members

From CipherMode

authenticated
bool authenticated()

Returns true iff this mode provides authentication as well as confidentiality.

Meta