Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use feature 'say';
- use Crypt::AES::CTR;
- my $key='01234567890abcdef';
- my $bit=256;
- my $aes = Crypt::AES::CTR->new(
- key =>$key,
- nbits=>$bit
- );
- my $plainText='AES on Workshop@UNINA2014';
- say '-> stringa in chiaro: '.$plainText."\n";
- my $encryptedText=$aes->encrypt($plainText);
- say '-> stringa criptata con AES: '.$encryptedText;
- my $decryptedText=$aes->decrypt($encryptedText);
- say '-> stringa decriptata con AES: '.$decryptedText;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement