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 deprecated in php 7.1 #29

Closed
mabuonomo opened this issue Dec 30, 2016 · 2 comments · Fixed by wpovernight/dropbox-php-sdk#1 or #103
Closed

mcrypt deprecated in php 7.1 #29

mabuonomo opened this issue Dec 30, 2016 · 2 comments · Fixed by wpovernight/dropbox-php-sdk#1 or #103

Comments

@mabuonomo
Copy link

mabuonomo commented Dec 30, 2016

Hi,
on ubuntu 14.04 with php7.1

Deprecated: Function mcrypt_create_iv() is deprecated in /var/www/html/abbashare/vendor/kunalvarma05/dropbox-php-sdk/src/Dropbox/Security/McryptRandomStringGenerator.php on line 47

From php.net:
The Mcrypt library has been declared DEPRECATED since PHP 7.1, to use in its OpenSSL

@kunalvarma05
Copy link
Owner

kunalvarma05 commented Dec 30, 2016

Hey,

I'm working on a PHP7+ only version of the package.

For now, instead of the Kunnu/Dropbox/Security/McryptRandomStringGenerator class, you can use the Kunnu/Dropbox/Security/OpenSslRandomStringGenerator class.

This can be configured while initializing the Dropbox class. You can follow the Advanced Configuration guide which shows how you can swap the default McryptRandomStringGenerator with the OpenSslRandomStringGenerator or with your own implementation of the RandomStringGeneratorInterface.

Thanks for reporting :)

Spreeuw added a commit to Spreeuw/dropbox-php-sdk that referenced this issue Dec 4, 2017
@Spreeuw
Copy link
Contributor

Spreeuw commented Dec 4, 2017

Perhaps add a fallback to random_bytes() in case ext/openssl is not installed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants