Share

phpPasswordManager

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Installation on *GASP* Windows!

You are viewing a single message from this topic. View all messages.

  1. 2007-07-24 09:34:06 UTC
    Just a quick heads up to anyone installing this on a Windows machine - you'll need to edit classes/clsPpmCrypt.php (line 9) to reference MCrypt's built in random seed generator.

    A quick fix that I found to work is to replace MCRYPT_DEV_URANDOM with MCRYPT_RAND, not forgetting that you need to seed the generator with srand(); before the call. An updated createIV() could look something like this:


    function createIV() {
    // TODO: Add proper check for Windows platform to determine iv source
    srand(); //could add a seed generated from microtime or similar
    $resEncDes = mcrypt_module_open('rijndael-256', '', 'cbc', '');
    $strInitialVector = mcrypt_create_iv(mcrypt_enc_get_iv_size($resEncDes), MCRYPT_RAND); //modified for Windows support
    mcrypt_module_close($resEncDes);

    return $strInitialVector;
    }


    Hope this helps somebody!

    Rob
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.