NAME
Crypt::Sodium::Nitrate - Don't let your sodium levels get too high!
DESCRIPTION
A thin wrapper around libsodium, exposing only the minimum necessary to use the sodium secretbox.
This module was derived from code in Crypt::NaCl::Sodium, particularly Crypt::NaCl::Sodium::secretbox. Head over there for a more extensive interface to libsodium!
The main difference is that Crypt::Sodium::Nitrate
does not use protected memory to store the encrypted/decrypted value; everything is done in Perl-allocated memory.
FUNCTIONS
decrypt($ciphertext, $nonce, $key)
Throws an exception if $ciphertext cannot be decrypted.
encrypt($plaintext, $nonce, $key)
Decrypts the value.
MACBYTES
Size of the MAC
KEYBYTES
Size of the key
NONCEBYTES
Size of the nonce