crypto_box_afternm

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

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

Parameters

c ubyte[]

resulting cyphertext

msg const(ubyte)[]

message

nonce const(ubyte)[]

nonce

key const(ubyte)[]

secret

Return Value

Type: bool

success flag and cyphertext in 'c'

Meta