open

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

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

Return

The decrypted message

Parameters

box

: The encrypted message

nonce

: The nonce used for encryption