box

Encrypt a message using asymmetric cryptography.

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

Parameters

msg ubyte[]

The secret message.

nonce ubyte[]

A number unique per (secret_key, public_key) pair.

secret_key ubyte[]

Your secret key.

public_key ubyte[]

Recipients public key.

Return Value

Type: ubyte[]

Encrypted and authenticated packet.

Meta