Merge b9d6f1db765ce3f11ee246176f9932f97e9d1935 into 2a1294f1c089bb8e68d38d1803d08858907f352a

This commit is contained in:
アンドリー・アンドリ 2025-08-08 10:38:18 +02:00 committed by GitHub
commit 34a293643a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ class DeriveEVPKey extends Operation {
{
"name": "Hashing function",
"type": "option",
"value": ["SHA1", "SHA256", "SHA384", "SHA512", "MD5"]
"value": ["SHA256", "SHA384", "SHA512"]
},
{
"name": "Salt",
@ -69,10 +69,10 @@ class DeriveEVPKey extends Operation {
hasher = args[3],
salt = CryptoJS.enc.Latin1.parse(
Utils.convertToByteString(args[4].string, args[4].option)),
key = CryptoJS.EvpKDF(passphrase, salt, { // lgtm [js/insufficient-password-hash]
key = CryptoJS.PBKDF2(passphrase, salt, { // Secure password-based key derivation
keySize: keySize,
hasher: CryptoJS.algo[hasher],
iterations: iterations,
iterations: Math.max(iterations, 10000), // Ensure a minimum of 10,000 iterations
});
return key.toString(CryptoJS.enc.Hex);