MDL-31836 moodlelib: removed legacy encryptkey support
authorSam Hemelryk <sam@moodle.com>
Sun, 4 Aug 2013 21:45:52 +0000 (09:45 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 11 Aug 2013 22:26:01 +0000 (10:26 +1200)
lib/moodlelib.php

index 9c1bae1..e9ccf63 100644 (file)
@@ -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');
 }
 
 /**