PAB3::Crypt::XOR

PAB3::Crypt::XOR is a simple periodic XOR encryption.
Download

PAB3::Crypt::XOR Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Christian Mueller
  • Publisher web site:
  • http://search.cpan.org/~chrmue/PAB3-3.1.5/xs/PAB3/Crypt/XOR/XOR.pm

PAB3::Crypt::XOR Tags


PAB3::Crypt::XOR Description

PAB3::Crypt::XOR is a simple periodic XOR encryption. PAB3::Crypt::XOR is a simple periodic XOR encryption.SYNOPSIS use PAB3::Crypt::XOR qw(:default); my $key = 'MYSECRETKEY'; $crypt = xor_encrypt( $key, 'plain text' ); print "encrypted: ", unpack( 'H*', $crypt ), "n"; $plain = xor_decrypt( $key, $crypt ); print "plain: $plainn"; $crypt = xor_encrypt_hex( $key, 'plain text' ); print "encrypted: $cryptn"; $plain = xor_decrypt_hex( $key, $crypt ); print "plain: $plainn";PAB3::Crypt::XOR provides an interace to simple periodic XOR encryption.Code is based on BrowseX XOR Encryption.The BrowseX XOR encryption varies by generating a start seed based upon the XORing of all characters in the password. Modulo arithmetic is used with the seed to determine the offset within the password to start. Modulo is again used to determine when to recalculate the seed based upon the currently selected password character. And finally, the password character itself is XORed with the current seed before it is itself used to XOR the data.METHODSencrypt ( $key, $plain ) Encrypt plain data with a key. encrypt() works like decrypt() .decrypt ( $key, $cipher ) Decrypt cipher to plain data. decrypt() works like encrypt() .encrypt_hex ( $key, $plain ) Encrypt plain data with a key and return a hexadecimal string of cipher as human readable.decrypt_hex ( $key, $hex_cipher ) Decrypt hexadecimal string of cipher to plain data. Requirements: · Perl


PAB3::Crypt::XOR Related Software