crypto_box_open

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

bool
crypto_box_open
()
(
ubyte[] msg
,
const(ubyte)[] c
,
const(ubyte)[] nonce
,
const(ubyte)[] pk
,
const(ubyte)[] sk
)

Parameters

msg ubyte[]

resulting message

c const(ubyte)[]

cyphertext

nonce const(ubyte)[]

nonce

pk const(ubyte)[]

receiver's public key

sk const(ubyte)[]

sender's secret key

Return Value

Type: bool

success flag and message in 'msg'

Meta