chaCha20Poly1305Encrypt

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

Encrypt the message and return encrypted data and tag using ChaChaPoly1305 (64 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 chaCha20Poly1305Encrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray
actual fun chaCha20Poly1305Encrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray
actual fun chaCha20Poly1305Encrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray
actual fun chaCha20Poly1305Encrypt(message: UByteArray, associatedData: UByteArray, nonce: UByteArray, key: UByteArray): UByteArray