NaCl::AEAD::XChaCha20Poly1305
Inherits NaCl::AEAD::Base / Reference / Object
The XChaCha20-Poly1305 construction can safely encrypt a practically unlimited number of messages with the same key, without any practical limit to the size of a message (up to ~ 2^64 bytes).
As an alternative to counters, its large nonce size (192-bit) allows random nonces to be safely used.
For this reason, and if interoperability with other libraries is not a concern, this is the recommended AEAD construction.
For documentation on all AEAD methods, see AEAD::Base.
Class methods
keygen
SourceInstance methods
do_decrypt(message, message_len, nonce, ciphertext, additional_data = nil)
Sourcedo_encrypt(ciphertext, ciphertext_len, nonce, message, additional_data = nil)
Source