by eksith · 13y ago · 0 comments
Couldn't you get away with:
function IV( $size, $ssl = false ) {
if ( $ssl && function_exists( 'openssl_random_pseudo_bytes' ) ) {
return openssl_random_pseudo_bytes( $size, true );
}
return mcrypt_create_iv( $size, MCRYPT_DEV_URANDOM );
}
From the docs: http://it.php.net/manual/en/function.mcrypt-create-iv.php 5.3.0 MCRYPT_DEV_RANDOM and MCRYPT_DEV_URANDOM became available on Windows platforms.No comments yet.