crypto_secretbox

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'.

bool
crypto_secretbox
()
(
ubyte[] c
,
const(ubyte)[] msg
,
const(ubyte)[] nonce
,
const(ubyte)[] key
)

Parameters

c ubyte[]

resulting cyphertext

key const(ubyte)[]

secret key

nonce const(ubyte)[]

nonce

Return Value

Type: bool

success flag and cyphertext in 'c'

Meta