Crypt::IDEACrypt::IDEA is a Perl interface to the IDEA block cipher. | |
Download |
Crypt::IDEA Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Dave Paris
- Publisher web site:
- http://search.cpan.org/~dparis/Crypt-IDEA-1.08/IDEA.pod
Crypt::IDEA Tags
Crypt::IDEA Description
Crypt::IDEA is a Perl interface to the IDEA block cipher. Crypt::IDEA is a Perl interface to the IDEA block cipher.SYNOPSIS use Crypt::IDEA;This perl extension is an implementation of the IDEA block cipher algorithm. The module implements the Crypt::BlockCipher 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.new my $cipher = new IDEA $key; This creates a new IDEA BlockCipher object, using $key, where $key is a key of keysize() bytes.encrypt my $cipher = new IDEA $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 IDEA $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("H32", "0123456789ABCDEF0123456789ABCDEF"); my $cipher = new IDEA $key; my $ciphertext = $cipher->encrypt("plaintex"); # NB - 8 bytes print unpack("H16", $ciphertext), "n"; Requirements: · Perl
Crypt::IDEA Related Software