<?php
$td = @mcrypt_module_open('rijndael-256', '', 'cfb', '');
if ($td) {
/* Get key size and IV size */
$iv_size = mcrypt_enc_get_iv_size($td);
$key_size = mcrypt_enc_get_key_size($td);
/* Create IV and 'key' */
$iv = mcrypt_create_iv($iv_size);
$key = substr(sha1('very secret key'), 0, $key_size);
/* Init encryption module */
mcrypt_generic_init($td, $key, $iv);
}
?>