Lot of Encryption method avialble in perl
like md5,ARC4 Base64 etc
i have given AES String Encryption
PHP Code:
use chilkat;
$crypt = new chilkat::CkCrypt2();
$success = $crypt->UnlockComponent("Anything for 30-day trial");
if ($success != 1) {
print "Crypt component unlock failed" . "\n";
exit;
}
$password = "secretPassPhrase";
$crypt->put_CryptAlgorithm("aes");
$crypt->put_CipherMode("cbc");
$crypt->put_KeyLength(128);
$hexKey = $crypt->genEncodedSecretKey($password,"hex");
$crypt->SetEncodedKey($hexKey,"hex");
$crypt->put_EncodingMode("base64");
$text = "The quick brown fox jumped over the lazy dog.";
$encText = $crypt->encryptStringENC($text);
print $encText . "\r\n";
$decryptedText = $crypt->decryptStringENC($encText);
print $decryptedText . "\r\n";