Crypto::AeadChacha20Poly1305
AEAD_CHACHA20_POLY1305 is an authenticated encryption with additional data algorithm.
Constructors
Instance methods
aad(data : Bytes)
Arbitrary length additional authenticated data (AAD). Needs to be written before the plaintext. Can be called multiple times, but only the last block can be less then 16 bytes.
decrpyt parses the data and verifies the data with the tag returns the additional authenticated data. The plaintext is written to the provided mem, in case the tag is not validating the data an exception is raised.