xChaCha20Poly1305IetfEncrypt

actual fun xChaCha20Poly1305IetfEncrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray
expect fun xChaCha20Poly1305IetfEncrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray

Encrypt the message and return encrypted data and tag using xChaChaPoly1305 (192 bit nonce)

Return

encrypted data and tag (in that order)

Parameters

message

message to encrypt

associatedData

associated data the won't be encrypted, but will be authenticated

nonce

a unique nonce

key

secret key

actual fun xChaCha20Poly1305IetfEncrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray
actual fun xChaCha20Poly1305IetfEncrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray