Crypt::MCrypt - Perl interface for libmcrypt C library.
version 0.07
use Crypt::MCrypt; my $iv = pack("H*","0000000000000000"); my $key = pack("H*","1234567890123456" . "7890123456789012" . "1234567890123456"); my $cipher_text = pack("H*","E9FF3161EE05ABC9" . "7ea3cacb991318aa" . "585379599b0eaabb" . "c4e474ead1956f47" . "6755f13f1af5235d"); my $algorithm = "tripledes"; my $mode = "cbc"; my $obj = Crypt::MCrypt->new( algorithm => $algorithm, mode => $mode, key => $key, iv => $iv, ); my $plain_text = $obj->decrypt($cipher_text); print "\nPLAIN: $plain_text\n"; print "\nPLAIN in hex: " . unpack("H*",$plain_text) . "\n"; $cipher_text = $obj->encrypt($plain_text); print "\nCIPHER: $cipher_text\n"; print "\nCIPHER in hex: " . unpack("H*",$cipher_text) . "\n";
This is a perl interface to libmcrypt c library. It exposes the crypto functions provided by the libmcrypt library in a perl interface with a binding code that accounts for null C strings in ciphertext or plain text.
contains the name of the algorithm used to decrypt encrypt blocks of data
contains the name of the block cipher mode of operation used to encrypt/decrypt blocks of data.
contains the key for the encryption decryption algorithm
contains the Initialization for the first block of data in block cipher mode of operation.
decrypt blocks of ciphertext
encrypt blocks of data
This module provides a object oriented interface to the libmcrypt library. It uses Mo, a scaled down version of Moose without any data checks to improve speed.
Mo
Please report any bugs or feature requests through github at https://github.com/shantanubhadoria/crypt-mcrypt/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/shantanubhadoria/crypt-mcrypt
git clone git://github.com/shantanubhadoria/crypt-mcrypt.git
Shantanu Bhadoria <shantanu at cpan dott org>
Shantanu <shantanu@cpan.org>
Shantanu Bhadoria <shantanu@cpan.org>
This software is copyright (c) 2013 by Shantanu Bhadoria.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Crypt::MCrypt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::MCrypt
CPAN shell
perl -MCPAN -e shell install Crypt::MCrypt
For more information on module installation, please visit the detailed CPAN module installation guide.