Crypt::GCMCrypt::GCM is a Perl module that features the Galois/Counter mode (GCM). | |
Download |
Crypt::GCM Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Hiroyuki OYAMA
- Publisher web site:
- http://search.cpan.org/~oyama/Crypt-GCM-0.02/lib/Crypt/GCM.pm
Crypt::GCM Tags
Crypt::GCM Description
Crypt::GCM is a Perl module that features the Galois/Counter mode (GCM). Crypt::GCM is a Perl module that features the Galois/Counter mode (GCM).SYNOPSIS use Crypt::GCM; use Crypt::Rijndael; my $gcm = Crypt::GCM->new(-key => $key, -cipher => 'Crypt::Rijndael'); my $gcm->set_iv($iv); my $gcm->aad(''); my $cipher_string = $gcm->encrypt($message); my $tag = $gcm->tag;The module implements the Galois/Counter Mode (GCM) for Confidentiality and Authentication. The function of GCM in which the plaintext is encrypted into the ciphertext, and an authentication tag is generated on the AAD and the ciphertext.new() my $cipher = Crypt::GCM->new( -key => pack 'H*', '00000000000000000000000000000000', -cipher => 'Crypt::Rijndael', );The new() method creates an new Crypt::GCM object. It accepts a list of -argument => value pairs selected from the following list: Argument Description -------- ----------- -key The encryption/decryption key (required) -cipher The cipher algorithm (required)encrypt() my $ciphertext = $cipher->encrypt($plaintext);decrypt() my $plaintext = $cipher->decrypt($ciphertext);set_iv() $cipher->set_iv($iv);This allows you to change the initialization vector. allow 16byte string.aad() $cipher->aad($text); my $text = $cipher->aad();tag() $cipher->tag($tag); my $tag = $cipher->tag(); Requirements: · Perl
Crypt::GCM Related Software