From 7bef120a0ad748fb6391475fd289ce6d8b09e200 Mon Sep 17 00:00:00 2001 From: Barry Brown Date: Thu, 13 Jun 2024 01:44:56 +0000 Subject: [PATCH] Uses affineEcrypt instead of affineEncode --- src/core/operations/AffineCipherEncode.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/operations/AffineCipherEncode.mjs b/src/core/operations/AffineCipherEncode.mjs index a9462ae8..c3da8f76 100644 --- a/src/core/operations/AffineCipherEncode.mjs +++ b/src/core/operations/AffineCipherEncode.mjs @@ -5,7 +5,7 @@ */ import Operation from "../Operation.mjs"; -import { affineEncode } from "../lib/Ciphers.mjs"; +import { affineEncrypt } from "../lib/Ciphers.mjs"; /** * Affine Cipher Encode operation @@ -44,7 +44,8 @@ class AffineCipherEncode extends Operation { * @returns {string} */ run(input, args) { - return affineEncode(input, args); + const a = args[0], b = args[1], alphabet = args[2]; + return affineEncrypt(input, a, b, "a-z"); } /**