chaCha20Poly1305IetfEncryptDetached

Encrypt the message and return encrypted data and tag using ChaChaPoly1305-IETF (96 bit nonce) as separate arrays (but wrapped inside AeadEncryptedDataAndTag)

Return

encrypted data and tag wrapped inside AeadEncryptedDataAndTag data class instance

Parameters

message

message to encrypt

associatedData

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

nonce

a unique nonce

key

secret key