G2A Many GEOs
SHARE
TWEET

Vigenere algorithm implementation

Anakthewolf May 11th, 2014 179 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use feature 'say';
  6.  
  7. use Crypt::Vigenere;
  8.  
  9. my $keyWord='bruto';
  10. my $vigenere = Crypt::Vigenere->new($keyWord);
  11.  
  12. # cripta stringa
  13. my $plainText='anakvaincampagna';
  14. my $encryptedText = $vigenere->encodeMessage($plainText);
  15.  
  16. # decripta stringa
  17. my $decryptedText = $vigenere->decodeMessage($encryptedText);
  18.  
  19. say '-> Vigenere - testo in chiaro: '.$plainText;
  20. say '-> Vigenere - testo criptato: '.$encryptedText;
  21. say '-> Vigenere - testo decriptato: '.$decryptedText;
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top