mirror of
https://github.com/gchq/CyberChef
synced 2025-12-10 05:13:23 +00:00
ESM: Tidied up recently ported ops
This commit is contained in:
@@ -62,7 +62,9 @@ class DerivePBKDF2Key extends Operation {
|
||||
*/
|
||||
run(input, args) {
|
||||
const passphrase = Utils.convertToByteString(args[0].string, args[0].option),
|
||||
[, keySize, iterations, hasher, ] = args, //eslint-disable-line array-bracket-spacing
|
||||
keySize = args[1],
|
||||
iterations = args[2],
|
||||
hasher = args[3],
|
||||
salt = Utils.convertToByteString(args[4].string, args[4].option) ||
|
||||
forge.random.getBytesSync(keySize),
|
||||
derivedKey = forge.pkcs5.pbkdf2(passphrase, salt, iterations, keySize / 8, hasher.toLowerCase());
|
||||
|
||||
Reference in New Issue
Block a user