NAME
Crypt::Fernet - Perl extension for Fernet (symmetric encryption)
SYNOPSIS
use Crypt::Fernet;
my $key = Crypt::Fernet::generate_key();
my $plaintext = 'This is a test';
my $token = Crypt::Fernet::encrypt($key, $plaintext);
my $verify = Crypt::Fernet::verify($key, $token);
my $decrypttext = Crypt::Fernet::decrypt($key, $token);
my $old_key = 'cJ3Fw3ehXqef-Vqi-U8YDcJtz8Gv-ZHyxultoAGHi4c=';
my $old_token = 'gAAAAABT8bVcdaked9SPOkuQ77KsfkcoG9GvuU4SVWuMa3ewrxpQdreLdCT6cc7rdqkavhyLgqZC41dW2vwZJAHLYllwBmjgdQ==';
my $ttl = 10;
my $old_verify = Crypt::Fernet::verify($old_key, $old_token, $ttl);
my $old_decrypttext = Crypt::Fernet::decrypt($old_key, $old_token, $ttl);
my $ttl_verify = Crypt::Fernet::verify($key, $token, $ttl);
my $ttl_decrypttext = Crypt::Fernet::decrypt($key, $token, $ttl);
DESCRIPTION
Fernet provides guarantees that a message encrypted using it cannot be manipulated or read without the key. Fernet is an implementation of symmetric (also known as “secret key”) authenticated cryptography. This is the Perl Implementation
More Detail: https://github.com/fernet/spec/blob/master/Spec.md
EXPORT
None by default.
SEE ALSO
More Detail on the Fernet Spec: https://github.com/fernet/spec/blob/master/Spec.md
Source of this project: https://github.com/wanleung/Crypt-Fernet
AUTHOR
Wan Leung Wong, <wanleung@linkomnia.com>
COPYRIGHT AND LICENSE
Copyright (C) 2014 by LinkOmnia Ltd (Wan Leung Wong wanleung@linkomnia.com)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 175:
Non-ASCII character seen before =encoding in '“secret'. Assuming UTF-8