mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-31836 moodlelib: removed legacy encryptkey support
This commit is contained in:
parent
50ff861263
commit
1f0608ed34
1 changed files with 4 additions and 34 deletions
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue