crypto_secretbox_open

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

bool
crypto_secretbox_open
()
(
ubyte[] output
,
const(ubyte)[] c
,
const(ubyte)[] nonce
,
const(ubyte)[] key
)

Parameters

output ubyte[]

resulting message

c const(ubyte)[]

cyphertext

key const(ubyte)[]

secret key

nonce const(ubyte)[]

nonce

Return Value

Type: bool

success flag and message in 'output'

Meta