box

abstract fun box(message: ByteArray, nonce: ByteArray): ByteArray

Encrypts and authenticates message using the key and the nonce. The nonce must be unique for each distinct message for this key.

Return

The encrypted message

Parameters

message

: The message to encrypt

nonce

: The nonce to use for encryption