secretbox

High-level symmetric authenticated encryption.

@safe nothrow
ubyte[]
secretbox
(
in ubyte[] msg
,
in ubyte[] nonce
,
in ubyte[] key
)

Parameters

msg ubyte[]

Plaintext message.

nonce ubyte[]

24 bytes used once per key.

key ubyte[]

Secret shared key. 32 bytes.

Return Value

Type: ubyte[]

Authentication tag and encrypted message. The output is 16 bytes longer than the input.

Meta