Hi, I haven't written anything in perl for quite some time, so I'm pretty rusty. Does anyone have a perl version of this PHP code:
function encrypt($string, $key) { // version 2.4.x of lib mcrypt $td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init ($td, $key, $iv); $crypted = mcrypt_generic ($td, $string); mcrypt_generic_end ($td); return bin2hex($crypted); } function decrypt($string, $key) { //version 2.4.x of lib mcrypt $string = hex2bin($string); $td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init ($td, $key, $iv); $decrypted = mdecrypt_generic ($td, $string); mcrypt_generic_end ($td); return trim($decrypted); } Thanks, Tyler -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]