cryptoAEADXChaCha20Poly1305IETFEncrypt :: Ptr CUCharOutput buffer. Contains the encrypted message, authentication tag, and non-confidential additional data.
-> Ptr CULLongSize of computed output. Should be message length plus cryptoAEADXChaCha20Poly1305IETFABytes. If set to nullPtr, then no bytes will be written to this buffer.
-> Ptr CUCharMessage to be encrypted.
-> CULLongMessage length.
-> Ptr CUCharNon-confidential additional data. Can be null with additional data length of 0 if no additional data is required.
-> CULLongAdditional data length.
-> Ptr CUCharnsec, a parameter not used in this function. Should always be nullPtr.-> Ptr CUCharPublic nonce of size cryptoAEADXChaCha20Polt1305IETFPubBytes. Should never be reused with the same key. Nonces can be generated using randombytesBuf.
-> Ptr CUCharSecret key of size cryptoAEADXChaCha20Poly1305IETFKeyBytes.
-> IO CIntReturns -1 on failure, 0 on success.
This function encrypts a message, and then appends the authentication tag to the encrypted message.