ddn.crypto.cipher.chacha

ChaCha20 Stream Cipher (RFC 8439).

class ChaCha20

Types 1

ChaCha20 Implementation.

Supports 32-byte keys. Supports 12-byte nonce (RFC 8439) and 8-byte nonce (Legacy).

Methods
void wipe() nothrow @nogc @trustedZeroizes the cipher state, the initial (key-bearing) state, and any buffered keystream.
void initialize(CipherOperation op, SecretKey key, const(ubyte)[] iv)
void init(CipherOperation op, Key key, const(ubyte)[] iv = null)
ubyte[] update(const(ubyte)[] input)
ubyte[] finish(const(ubyte)[] input = null)
void setCounter(ulong counter)Manually sets the counter. Useful for random access or specific protocols. Params: counter = The counter value.
Destructors