Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
      my @k = unpack "C*", $k; 
      print pack "C*", map { $_^shift @k } unpack "C*", $t;
    }
    
  2. or download this
    # make a key file, ok for demo purposes
    $ perl -e 'print chr int rand 256 for 0..10000' > key.file
    ...
    # verify
    $ diff -s plain.txt deciphered.txt 
    Files plain.txt and deciphered.txt are identical