ddn.crypto.cipher.chacha_poly

ChaCha20-Poly1305 AEAD Construction (RFC 7539).

Types 1

ChaCha20-Poly1305 AEAD Implementation.

Combines ChaCha20 stream cipher with Poly1305 MAC. Conforms to RFC 7539.

Fields
private Key _key
private ubyte[] _zeros
Methods
size_t tagSize() @property const
size_t nonceSize() @property const
size_t keySize() @property const
ubyte[] seal(const(ubyte)[] plaintext, const(ubyte)[] aad, const(ubyte)[] nonce, ubyte[] output = null)
ubyte[] open(const(ubyte)[] ciphertext, const(ubyte)[] aad, const(ubyte)[] nonce, ubyte[] output = null)
private void pad(MAC mac, size_t len)
Constructors
this(Key key)Constructs a ChaCha20Poly1305 instance with the given key.