Fix RC4Drop

CryptoJS uses words instead of bytes in RC4Drop.
This commit is contained in:
BlueC0re 2020-07-02 15:05:07 +02:00 committed by GitHub
parent c9d9730726
commit 42cdb1feab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,7 +58,7 @@ class RC4Drop extends Operation {
run(input, args) {
const message = format[args[1]].parse(input),
passphrase = format[args[0].option].parse(args[0].string),
drop = args[3],
drop = args[3]/4,
encrypted = CryptoJS.RC4Drop.encrypt(message, passphrase, { drop: drop });
return encrypted.ciphertext.toString(format[args[2]]);