SecretKey
NAME
Crypt::TweetNacl::SecretKey - secret key crypto library
SYNOPSIS
use Crypt::TweetNacl::SecretKey;
# create key
my $alice = Key.new;
# create Buf to encrypt
my $msg = 'Hello World'.encode('UTF-8');
# encrypt
my $csb = CryptoSecretBox.new(sk => $alice.secret);
my $data = $csb.encrypt($msg);
# decrypt
my $csbo = CryptoSecretBoxOpen.new(sk => $alice.secret);
my $rmsg = $csbo.decrypt($data);
say $rmsg.decode('UTF-8') # 'Hello World'
DESCRIPTION
OPTIONS
RETURN VALUE
In case problems arise this is reported by an exception.
ERRORS
DIAGNOSTICS
EXAMPLES
ENVIRONMENT
FILES
CAVEATS
Various other(not documented) classes and methods might be exported
by the library. Please ignore them.
BUGS
RESTRICTIONS
NOTES
SEE ALSO
- https://nacl.cr.yp.to/secretbox.html
- https://tweetnacl.cr.yp.to/tweetnacl-20131229.pdf
AUTHOR
Frank Hartmann
HISTORY
); }