SecretBox

interface SecretBox

Implements xsalsa20-poly1305

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
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.

Link copied to clipboard
abstract fun open(box: ByteArray, nonce: ByteArray): ByteArray

Authenticates and decrypts the given secret box using the key and the nonce.