Help for this page

Select Code to Download


  1. or download this
    function encrypt_text($plain_text, $key){
    bin2hex(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $plain_text, MCRYPT_
    +MODE_ECB));
    return $encrypt_text;
    }
    
  2. or download this
    use Crypt::Rijndael;
    use Crypt::CBC;
    ...
    my $cipher_text = $cipher->encrypt($plain_text);
    my $cipher_block = unpack ("H*", $cipher_text);
    return $cipher_block;