- rtrim: documentation ( source)
- base64_decode: documentation ( source)
- md5: documentation ( source)
<?php
function decryptIt($value) {
// The decodeKey MUST match the encodeKey
$decodeKey = '0z%E4!3I1C#5y@9&qTx@swGn@78ePqViI1C#5y@';
$decoded = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($decodeKey), base64_decode($value), MCRYPT_MODE_CBC, md5(md5($decodeKey))), "\0");
return($decoded);
}
echo decryptIt('at0SI5eUOsHI/5Y+HmjRaI5HJZB+qyLyh+p5VnrRJSM=');