Search code examples
phpiismcryptpbkdf2

Using mcrypt_create_iv on PHP IIS


I'm trying to set up password salting on our website, and found the PBKDF2 functions at https://defuse.ca/php-pbkdf2.htm
When I try it, I get:

Fatal error: mcrypt_create_iv(): Could not gather sufficient random data in include\PBKDF2.php on line 23

I'm not sure if I need to do anything to make this work. It's running on IIS7.5


Solution

  • I was using PHP 5.3.6, which apparently has a bug with mcrypt_create_iv().
    Switched to the latest version 5.4.7 and it started working.