box

Encrypt a message using asymmetric cryptography.

ubyte[]
box
@safe nothrow
(
in ubyte[] msg
,
in ubyte[] nonce
,
in ubyte[] secret_key
,
in ubyte[] public_key
)

Parameters

msg
Type: ubyte[]

The secret message.

nonce
Type: ubyte[]

A number unique per (secret_key, public_key) pair.

secret_key
Type: ubyte[]

Your secret key.

public_key
Type: ubyte[]

Recipients public key.

Return Value

Type: ubyte[]

Encrypted and authenticated packet.

Meta