wrapper.sodium.crypto_box

Undocumented in source.

Public Imports

deimos.sodium.crypto_box
public import deimos.sodium.crypto_box : crypto_box_SEEDBYTES, crypto_box_seedbytes, crypto_box_PUBLICKEYBYTES, crypto_box_publickeybytes, crypto_box_SECRETKEYBYTES, crypto_box_secretkeybytes, crypto_box_NONCEBYTES, crypto_box_noncebytes, crypto_box_MACBYTES, crypto_box_macbytes, crypto_box_MESSAGEBYTES_MAX, crypto_box_messagebytes_max, crypto_box_PRIMITIVE, crypto_box_BEFORENMBYTES, crypto_box_beforenmbytes, crypto_box_SEALBYTES, crypto_box_sealbytes;

Members

Aliases

crypto_box_beforenm
alias crypto_box_beforenm = deimos.sodium.crypto_box.crypto_box_beforenm
Undocumented in source.
crypto_box_detached
alias crypto_box_detached = deimos.sodium.crypto_box.crypto_box_detached
Undocumented in source.
crypto_box_detached_afternm
alias crypto_box_detached_afternm = deimos.sodium.crypto_box.crypto_box_detached_afternm
Undocumented in source.
crypto_box_easy
alias crypto_box_easy = deimos.sodium.crypto_box.crypto_box_easy
Undocumented in source.
crypto_box_easy_afternm
alias crypto_box_easy_afternm = deimos.sodium.crypto_box.crypto_box_easy_afternm
Undocumented in source.
crypto_box_keypair
alias crypto_box_keypair = deimos.sodium.crypto_box.crypto_box_keypair
Undocumented in source.
crypto_box_open_detached
alias crypto_box_open_detached = deimos.sodium.crypto_box.crypto_box_open_detached
Undocumented in source.
crypto_box_open_detached_afternm
alias crypto_box_open_detached_afternm = deimos.sodium.crypto_box.crypto_box_open_detached_afternm
Undocumented in source.
crypto_box_open_easy
alias crypto_box_open_easy = deimos.sodium.crypto_box.crypto_box_open_easy
Undocumented in source.
crypto_box_open_easy_afternm
alias crypto_box_open_easy_afternm = deimos.sodium.crypto_box.crypto_box_open_easy_afternm
Undocumented in source.
crypto_box_seal
alias crypto_box_seal = deimos.sodium.crypto_box.crypto_box_seal
Undocumented in source.
crypto_box_seal_open
alias crypto_box_seal_open = deimos.sodium.crypto_box.crypto_box_seal_open
Undocumented in source.
crypto_box_seed_keypair
alias crypto_box_seed_keypair = deimos.sodium.crypto_box.crypto_box_seed_keypair
Undocumented in source.

Functions

crypto_box_beforenm
bool crypto_box_beforenm(ubyte[crypto_box_BEFORENMBYTES] k, ubyte[crypto_box_PUBLICKEYBYTES] pk, ubyte[crypto_box_SECRETKEYBYTES] sk)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_box_detached
bool crypto_box_detached(ubyte[] c, ubyte[crypto_box_MACBYTES] mac, ubyte[] m, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey)
crypto_box_detached_afternm
bool crypto_box_detached_afternm(ubyte[] c, ubyte[crypto_box_MACBYTES] mac, ubyte[] m, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_BEFORENMBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_box_easy
bool crypto_box_easy(ubyte[] c, ubyte[] m, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey)
crypto_box_easy_afternm
bool crypto_box_easy_afternm(ubyte[] c, ubyte[] m, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_BEFORENMBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_box_keypair
bool crypto_box_keypair(ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey)

The crypto_box_keypair() function randomly generates a secret key and a corresponding public key. The public key is put into pkey and the secret key into skey.

crypto_box_open_detached
bool crypto_box_open_detached(ubyte[] m, ubyte[] c, ubyte[crypto_box_MACBYTES] mac, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey)
crypto_box_open_detached_afternm
bool crypto_box_open_detached_afternm(ubyte[] m, ubyte[] c, ubyte[crypto_box_MACBYTES] mac, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_BEFORENMBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_box_open_easy
bool crypto_box_open_easy(ubyte[] m, ubyte[] c, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey)
crypto_box_open_easy_afternm
bool crypto_box_open_easy_afternm(ubyte[] m, ubyte[] c, ubyte[crypto_box_NONCEBYTES] n, ubyte[crypto_box_BEFORENMBYTES] k)
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_box_primitive
string crypto_box_primitive()
Undocumented in source. Be warned that the author may not have intended to support it.
crypto_box_seal
bool crypto_box_seal(ubyte[] c, ubyte[] m, ubyte[crypto_box_PUBLICKEYBYTES] pkey)

The crypto_box_seal() function encrypts a message m for a recipient whose public key is pkey. It puts the ciphertext whose length is crypto_box_SEALBYTES + m.length into c. The function creates a new key pair for each message, and attaches the public key to the ciphertext. The secret key is overwritten and is not accessible after this function returns.

crypto_box_seal_open
bool crypto_box_seal_open(ubyte[] m, ubyte[] c, ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey)
crypto_box_seed_keypair
bool crypto_box_seed_keypair(ubyte[crypto_box_PUBLICKEYBYTES] pkey, ubyte[crypto_box_SECRETKEYBYTES] skey, ubyte[crypto_box_SEEDBYTES] seed)

Using crypto_box_seed_keypair(), the key pair can be deterministically derived from a single key seed.

Meta