wrapper.sodium.crypto_aead_aes256gcm

Undocumented in source.

Public Imports

deimos.sodium.crypto_aead_aes256gcm
public import deimos.sodium.crypto_aead_aes256gcm : crypto_aead_aes256gcm_is_available, crypto_aead_aes256gcm_KEYBYTES, crypto_aead_aes256gcm_keybytes, crypto_aead_aes256gcm_NSECBYTES, crypto_aead_aes256gcm_nsecbytes, crypto_aead_aes256gcm_NPUBBYTES, crypto_aead_aes256gcm_npubbytes, crypto_aead_aes256gcm_ABYTES, crypto_aead_aes256gcm_abytes, crypto_aead_aes256gcm_MESSAGEBYTES_MAX, crypto_aead_aes256gcm_messagebytes_max, crypto_aead_aes256gcm_state, crypto_aead_aes256gcm_statebytes, crypto_aead_aes256gcm_keygen;

Members

Aliases

crypto_aead_aes256gcm_beforenm
alias crypto_aead_aes256gcm_beforenm = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_beforenm
Undocumented in source.
crypto_aead_aes256gcm_decrypt
alias crypto_aead_aes256gcm_decrypt = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_decrypt
Undocumented in source.
crypto_aead_aes256gcm_decrypt_afternm
alias crypto_aead_aes256gcm_decrypt_afternm = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_decrypt_afternm
Undocumented in source.
crypto_aead_aes256gcm_decrypt_detached
alias crypto_aead_aes256gcm_decrypt_detached = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_decrypt_detached
Undocumented in source.
crypto_aead_aes256gcm_decrypt_detached_afternm
alias crypto_aead_aes256gcm_decrypt_detached_afternm = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_decrypt_detached_afternm
Undocumented in source.
crypto_aead_aes256gcm_encrypt
alias crypto_aead_aes256gcm_encrypt = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_encrypt
Undocumented in source.
crypto_aead_aes256gcm_encrypt_afternm
alias crypto_aead_aes256gcm_encrypt_afternm = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_encrypt_afternm
Undocumented in source.
crypto_aead_aes256gcm_encrypt_detached
alias crypto_aead_aes256gcm_encrypt_detached = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_encrypt_detached
Undocumented in source.
crypto_aead_aes256gcm_encrypt_detached_afternm
alias crypto_aead_aes256gcm_encrypt_detached_afternm = deimos.sodium.crypto_aead_aes256gcm.crypto_aead_aes256gcm_encrypt_detached_afternm
Undocumented in source.

Functions

crypto_aead_aes256gcm_beforenm
bool crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state ctx, ubyte[crypto_aead_aes256gcm_KEYBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_aead_aes256gcm_decrypt
bool crypto_aead_aes256gcm_decrypt(ubyte[] m, ubyte[] c, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, ubyte[crypto_aead_aes256gcm_KEYBYTES] k)

The function crypto_aead_aes256gcm_decrypt() verifies that the ciphertext c (as produced by crypto_aead_aes256gcm_encrypt()), includes a valid tag using a secret key k, a public nonce npub, and additional data ad. c.length is the ciphertext length in bytes with the authenticator, so it has to be at least aead_aes256gcm_ABYTES.

crypto_aead_aes256gcm_decrypt_afternm
bool crypto_aead_aes256gcm_decrypt_afternm(ubyte[] m, ubyte[] c, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, crypto_aead_aes256gcm_state ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_aead_aes256gcm_decrypt_detached
bool crypto_aead_aes256gcm_decrypt_detached(ubyte[] m, ubyte[] c, ubyte[crypto_aead_aes256gcm_ABYTES] mac, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, ubyte[crypto_aead_aes256gcm_KEYBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_aead_aes256gcm_decrypt_detached_afternm
bool crypto_aead_aes256gcm_decrypt_detached_afternm(ubyte[] m, ubyte[] c, ubyte[crypto_aead_aes256gcm_ABYTES] mac, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, crypto_aead_aes256gcm_state ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_aead_aes256gcm_encrypt
bool crypto_aead_aes256gcm_encrypt(ubyte[] c, ubyte[] m, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, ubyte[crypto_aead_aes256gcm_KEYBYTES] k)

The function crypto_aead_aes256gcm_encrypt() encrypts a message m using a secret key k (crypto_aead_aes256gcm_KEYBYTES bytes) and a public nonce npub (crypto_aead_aes256gcm_NPUBBYTES bytes). The encrypted message, as well as a tag authenticating both the confidential message m and ad.length bytes of non-confidential data ad, are put into c. ad can also be an empty array if no additional data are required. At most m.length + crypto_aead_aes256gcm_ABYTES bytes are put into c, reflected by the length of c. The function always returns true. The public nonce npub should never ever be reused with the same key. The recommended way to generate it is to use randombytes_buf() for the first message, and then to increment it for each subsequent message using the same key.

crypto_aead_aes256gcm_encrypt_afternm
bool crypto_aead_aes256gcm_encrypt_afternm(ubyte[] c, ubyte[] m, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, crypto_aead_aes256gcm_state ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_aead_aes256gcm_encrypt_detached
bool crypto_aead_aes256gcm_encrypt_detached(ubyte[] c, ubyte[crypto_aead_aes256gcm_ABYTES] mac, ubyte[] m, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, ubyte[crypto_aead_aes256gcm_KEYBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_aead_aes256gcm_encrypt_detached_afternm
bool crypto_aead_aes256gcm_encrypt_detached_afternm(ubyte[] c, ubyte[crypto_aead_aes256gcm_ABYTES] mac, ubyte[] m, ubyte[] ad, ubyte[crypto_aead_aes256gcm_NPUBBYTES] npub, crypto_aead_aes256gcm_state ctx)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

key
ubyte[crypto_aead_aes256gcm_KEYBYTES] key;
Undocumented in source.
nonce
ubyte[crypto_aead_aes256gcm_NPUBBYTES] nonce;
Undocumented in source.

Meta