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

mcrypt_create_iv() is not available in PHP>7.2 #6

Open
chybaDapi opened this issue Oct 16, 2019 · 1 comment
Open

mcrypt_create_iv() is not available in PHP>7.2 #6

chybaDapi opened this issue Oct 16, 2019 · 1 comment

Comments

@chybaDapi
Copy link

chybaDapi commented Oct 16, 2019

Hello,

in PHP>7.2 there is no possibilities to use mcrypt_create_iv() function (athens/encryption/src/Cipher.php:41). The solution could be to replace

$iv = mcrypt_create_iv(self::IV_SIZE, MCRYPT_RAND);

with

$iv = openssl_random_pseudo_bytes(self::IV_SIZE);
@chybaDapi chybaDapi changed the title mcrypt_create_iv() is not available in PHP7 mcrypt_create_iv() is not available in PHP7.2 Oct 16, 2019
@chybaDapi chybaDapi changed the title mcrypt_create_iv() is not available in PHP7.2 mcrypt_create_iv() is not available in PHP>7.2 Oct 16, 2019
@JASchilz
Copy link
Member

I haven't touched this in a while, could you do a merge request with the following:

  1. Modify the Travis file to test a PHP version greater than 7.2.
  2. Either show that the tests fail, or if the tests don't fail then write a new test which will fail under PHP > 7.2.
  3. Then include your fix, and show that the tests pass.

I'll then accept the request!

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