Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the Initialization vector? #3

Closed
NoMan2000 opened this issue Dec 2, 2016 · 2 comments
Closed

Changing the Initialization vector? #3

NoMan2000 opened this issue Dec 2, 2016 · 2 comments

Comments

@NoMan2000
Copy link
Contributor

I made a pull request to remove the call to mcrypt that's still in the file. It can be replaced with an openSSL call, your code will still work.

   // Build an initialisation vector	
   // Replacing all mcrypt calls
    // $iv = mcrypt_create_iv($this->iv_num_bytes, MCRYPT_DEV_URANDOM);
   
    // Build an initialisation vector
    $iv = openssl_random_pseudo_bytes($this->iv_num_bytes, $isStrongCrypto);
    if (!$isStrongCrypto) {
        throw new \Exception("Not a strong key");
    }
@NoMan2000
Copy link
Contributor Author

Ref: #4

@nickion
Copy link
Contributor

nickion commented Dec 5, 2017

Pull request merged a while back; thanks again for improving the code.

@nickion nickion closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants