- base64_decode: documentation ( source)
<?php
$key = 'FSHcT+sfRO/siok2ooweuA==';
$key = base64_decode($key);
$message = 'I want to decode this';
$iv = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM);
$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $message, MCRYPT_MODE_CBC, $iv);
$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $encrypted, MCRYPT_MODE_CBC, $iv);
print $encrypted;
?>