Uses affineEcrypt instead of affineEncode
This commit is contained in:
parent
979de8e488
commit
7bef120a0a
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Operation from "../Operation.mjs";
|
import Operation from "../Operation.mjs";
|
||||||
import { affineEncode } from "../lib/Ciphers.mjs";
|
import { affineEncrypt } from "../lib/Ciphers.mjs";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Affine Cipher Encode operation
|
* Affine Cipher Encode operation
|
||||||
@ -44,7 +44,8 @@ class AffineCipherEncode extends Operation {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
run(input, args) {
|
run(input, args) {
|
||||||
return affineEncode(input, args);
|
const a = args[0], b = args[1], alphabet = args[2];
|
||||||
|
return affineEncrypt(input, a, b, "a-z");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user