<?php

$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv(32, MCRYPT_DEV_RANDOM);
$iv = base64_encode($iv);
$iv = str_replace(array('+','/','='),array('-','_','.'), $iv);
echo ($iv), "\n";

?>
