Aegis256x4State

AEGIS-256x4 encryption/decryption state.

Manages the lifecycle of an aegis256x4_state object in a @nogc and @trusted context.

Constructors

this
this(const(ubyte)[] key, const(ubyte)[] nonce, const(ubyte)[] ad)

Initializes the AEGIS-256x4 state with the provided key, nonce, and associated data.

Destructor

~this
~this()

Destructor to clean up the state.

Postblit

this(this)
this(this)

Disabled copy constructor to prevent state duplication.

Members

Functions

decryptDetachedFinal
int decryptDetachedFinal(ubyte[] plaintext, size_t* written, const(ubyte)[] mac, size_t maclen)

Finalizes decryption in detached mode, verifying the MAC and producing final plaintext.

decryptDetachedUpdate
int decryptDetachedUpdate(ubyte[] plaintext, size_t* written, const(ubyte)[] ciphertext)

Decrypts a ciphertext chunk, producing plaintext.

encryptDetachedFinal
int encryptDetachedFinal(ubyte[] ciphertext, size_t* written, ubyte[] mac, size_t maclen)

Finalizes encryption in detached mode, producing the final ciphertext and MAC.

encryptUpdate
int encryptUpdate(ubyte[] ciphertext, size_t* written, const(ubyte)[] message)

Encrypts a message chunk, producing ciphertext.

Meta