1
0
mirror of synced 2024-11-27 16:10:55 +01:00

Merge pull request #1767 from zb3/fix-evpkey

This commit is contained in:
a3957273 2024-04-02 10:59:05 +01:00 committed by GitHub
commit 944810614a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,11 +62,13 @@ class DeriveEVPKey extends Operation {
* @returns {string}
*/
run(input, args) {
const passphrase = Utils.convertToByteString(args[0].string, args[0].option),
const passphrase = CryptoJS.enc.Latin1.parse(
Utils.convertToByteString(args[0].string, args[0].option)),
keySize = args[1] / 32,
iterations = args[2],
hasher = args[3],
salt = Utils.convertToByteString(args[4].string, args[4].option),
salt = CryptoJS.enc.Latin1.parse(
Utils.convertToByteString(args[4].string, args[4].option)),
key = CryptoJS.EvpKDF(passphrase, salt, { // lgtm [js/insufficient-password-hash]
keySize: keySize,
hasher: CryptoJS.algo[hasher],