Crypt::DES

Crypt::DES is a Perl DES encryption module.
Download

Crypt::DES Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Eric Young
  • Publisher web site:
  • http://search.cpan.org/~dparis/Crypt-DES-2.05/DES.pm

Crypt::DES Tags


Crypt::DES Description

Crypt::DES is a Perl DES encryption module. Crypt::DES is a Perl DES encryption module.SYNOPSIS use Crypt::DES;The module implements the Crypt::CBC interface, which has the following methodsblocksize =item keysize =item encrypt =item decryptFUNCTIONSblocksize Returns the size (in bytes) of the block cipher.keysize Returns the size (in bytes) of the key. Optimal size is 8 bytes.new my $cipher = new Crypt::DES $key; This creates a new Crypt::DES BlockCipher object, using $key, where $key is a key of keysize() bytes.encrypt my $cipher = new Crypt::DES $key; my $ciphertext = $cipher->encrypt($plaintext); This function encrypts $plaintext and returns the $ciphertext where $plaintext and $ciphertext should be of blocksize() bytes.decrypt my $cipher = new Crypt::DES $key; my $plaintext = $cipher->decrypt($ciphertext); This function decrypts $ciphertext and returns the $plaintext where $plaintext and $ciphertext should be of blocksize() bytes.EXAMPLE my $key = pack("H16", "0123456789ABCDEF"); my $cipher = new Crypt::DES $key; my $ciphertext = $cipher->encrypt("plaintex"); # NB - 8 bytes print unpack("H16", $ciphertext), "n"; Requirements: · Perl


Crypt::DES Related Software