static fun encryptDetached(message: Bytes, key: Key, nonce: Nonce): DetachedEncryptionResult
(source)static fun encryptDetached(message: ByteArray, key: Key, nonce: Nonce): DetachedEncryptionResult
(source)
Encrypt a message for a given key, generating a detached message authentication code.
message
- The message to encrypt.
Return
The encrypted data.
static fun encryptDetached(message: Bytes, data: Bytes, key: Key, nonce: Nonce): DetachedEncryptionResult
(source)
Encrypt a message for a given key, generating a detached message authentication code.
message
- The message to encrypt.
data
- Extra non-confidential data that will be included with the encrypted payload.
Return
The encrypted data.
static fun encryptDetached(message: ByteArray, data: ByteArray, key: Key, nonce: Nonce): DetachedEncryptionResult
(source)
Encrypt a message for a given key, generating a detached message authentication code.
message
- The message to encrypt.
data
- Extra non-confidential data that will be included with the encrypted payload.
UnsupportedOperationException
- If XChaCha20Poly1305 support is not available.
Return
The encrypted data.