Fix RC4Drop
CryptoJS uses words instead of bytes in RC4Drop.
This commit is contained in:
parent
c9d9730726
commit
42cdb1feab
@ -58,7 +58,7 @@ class RC4Drop extends Operation {
|
|||||||
run(input, args) {
|
run(input, args) {
|
||||||
const message = format[args[1]].parse(input),
|
const message = format[args[1]].parse(input),
|
||||||
passphrase = format[args[0].option].parse(args[0].string),
|
passphrase = format[args[0].option].parse(args[0].string),
|
||||||
drop = args[3],
|
drop = args[3]/4,
|
||||||
encrypted = CryptoJS.RC4Drop.encrypt(message, passphrase, { drop: drop });
|
encrypted = CryptoJS.RC4Drop.encrypt(message, passphrase, { drop: drop });
|
||||||
|
|
||||||
return encrypted.ciphertext.toString(format[args[2]]);
|
return encrypted.ciphertext.toString(format[args[2]]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user