The crypto_box() function encrypts and authenticates a message 'msg' using the sender's secret key 'sk', the receiver's public key 'pk', and a nonce 'nonce'. The crypto_box() function returns the resulting ciphertext 'c'.
The crypto_box_afternm() function encrypts and authenticates a message 'msg' using a secret key 'key' and a nonce 'nonce'. The crypto_box_afternm() function returns the resulting ciphertext 'c'.
Function crypto_box_beforenm() computes a shared secret 's' from public key 'pk' and secret key 'sk'.
The crypto_box_keypair() function randomly generates a secret key and a corresponding public key.
The crypto_box_open() function verifies and decrypts a ciphertext 'c' using the receiver's secret key 'sk', the sender's public key 'pk', and a nonce 'nonce'. The crypto_box_open() function returns the resulting message 'msg'.
The crypto_box_open_afternm() function verifies and decrypts a ciphertext 'c' using a secret key 'key' and a nonce 'nonce'. The crypto_box_open_afternm() function returns the resulting message 'msg'.
The crypto_hash() function hashes a message 'msg'. It returns a hash 'output'. The output length of 'output' should be at least crypto_hash_BYTES.
The crypto_onetimeauth() function authenticates a message 'msg' using a secret key 'key'. The function returns an authenticator 'output'.
The crypto_onetimeauth_verify() function checks that 'h' is a correct authenticator of a message 'msg' under the secret key 'key'.
The crypto_secretbox() function encrypts and authenticates a message 'msg' using a secret key 'key' and a nonce 'nonce'. The crypto_secretbox() function returns the resulting ciphertext 'c'.
The crypto_secretbox_open() function verifies and decrypts a ciphertext 'c' using a secret key 'key' and a nonce 'nonce'. The crypto_secretbox_open() function returns the resulting plaintext 'output'.
The crypto_sign() function signs a message 'msg' using the sender's secret key 'sk'. The crypto_sign() function returns the resulting signed message.
The crypto_sign() function signs a message 'msg' using the sender's secret key 'sk'. The crypto_sign() function returns the resulting signed message.
The crypto_sign_keypair() function randomly generates a secret key and a corresponding public key.
The crypto_sign_open() function verifies the signature in 'sm' using the receiver's public key 'pk'.
The crypto_sign_open() function verifies the signature in 'sm' using the receiver's public key 'pk'. The crypto_sign_open() function returns the message.
The crypto_stream() function produces a stream 'c' as a function of a secret key 'key' and a nonce 'nonce'.
The crypto_stream_salsa20() function produces a stream 'c' as a function of a secret key 'key' and a nonce 'nonce'.
The crypto_stream_salsa20_xor() function encrypts a message 'msg' using a secret key 'key' and a nonce 'nonce'. The crypto_stream_salsa20_xor() function returns the ciphertext 'output'.
The crypto_stream_xor() function encrypts a message 'msg' using a secret key 'key' and a nonce 'nonce'. The crypto_stream_xor() function returns the ciphertext 'c'.
The crypto_verify_16() function checks that strings 'x' and 'y' has same content.
The crypto_verify_32() function checks that strings 'x' and 'y' has same content.
set this callback to good (cryptograpic strong) random bytes generator you can use /dev/urandom as prng