From 1f0608ed342ac41d6fd31aa1dab37e70514f2501 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 5 Aug 2013 09:45:52 +1200 Subject: [PATCH] MDL-31836 moodlelib: removed legacy encryptkey support --- lib/moodlelib.php | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 9c1bae11665..e9ccf63d729 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -8035,51 +8035,21 @@ class emoticon_manager { /** * rc4encrypt * - * Please note that in this version of moodle that the default for rc4encryption is - * using the slightly more secure password key. There may be an issue when upgrading - * from an older version of moodle. - * - * @todo MDL-31836 Remove the old password key in version 2.4 - * Code also needs to be changed in sessionlib.php - * @see get_moodle_cookie() - * @see set_moodle_cookie() - * * @param string $data Data to encrypt. - * @param bool $usesecurekey Lets us know if we are using the old or new secure password key. * @return string The now encrypted data. */ -function rc4encrypt($data, $usesecurekey = true) { - if (!$usesecurekey) { - $passwordkey = 'nfgjeingjk'; - } else { - $passwordkey = get_site_identifier(); - } - return endecrypt($passwordkey, $data, ''); +function rc4encrypt($data) { + return endecrypt(get_site_identifier(), $data, ''); } /** * rc4decrypt * - * Please note that in this version of moodle that the default for rc4encryption is - * using the slightly more secure password key. There may be an issue when upgrading - * from an older version of moodle. - * - * @todo MDL-31836 Remove the old password key in version 2.4 - * Code also needs to be changed in sessionlib.php - * @see get_moodle_cookie() - * @see set_moodle_cookie() - * * @param string $data Data to decrypt. - * @param bool $usesecurekey Lets us know if we are using the old or new secure password key. * @return string The now decrypted data. */ -function rc4decrypt($data, $usesecurekey = true) { - if (!$usesecurekey) { - $passwordkey = 'nfgjeingjk'; - } else { - $passwordkey = get_site_identifier(); - } - return endecrypt($passwordkey, $data, 'de'); +function rc4decrypt($data) { + return endecrypt(get_site_identifier(), $data, 'de'); } /** -- 2.43.0