diff options
author | Andrew Dolgov <[email protected]> | 2017-01-07 14:25:46 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-01-07 14:25:46 +0300 |
commit | 17a8e61d2ae9e938aaf60292666b6ccf5cb09067 (patch) | |
tree | b6ddea4e4bb7cef4bcd2c4185fc63d8b78c8cbf4 /include/crypt.php | |
parent | 370fe2bdcdb9042310d0d86fe10b78174a7d1cf1 (diff) |
deprecate encrypted feed passwords because mcrypt is getting removed from php 7.1
1. transparent decryption for existing installs stays for the time being
2. new passwords are not going to be encrypted even if FEED_CRYPT_KEY is defined
3. added update.php --decrypt-feeds to bulk decrypt existing encrypted passwords
4. updated install to not auto-generate crypt key
5. added warning to config.php-dist
Diffstat (limited to 'include/crypt.php')
-rw-r--r-- | include/crypt.php | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/include/crypt.php b/include/crypt.php index f06483ef1..217ad3b0f 100644 --- a/include/crypt.php +++ b/include/crypt.php @@ -18,19 +18,4 @@ return false; } - - function encrypt_string($str) { - $key = hash('SHA256', FEED_CRYPT_KEY, true); - - $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, - MCRYPT_MODE_CBC), MCRYPT_RAND); - - $encstr = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $str, - MCRYPT_MODE_CBC, $iv); - - $iv_base64 = base64_encode($iv); - $encstr_base64 = base64_encode($encstr); - - return "$iv_base64:$encstr_base64"; - } ?> |