mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
affineDecrypt accepts either null or undefined from modInv
This commit is contained in:
parent
1017294942
commit
e1e88c35ef
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ export function affineDecrypt(input, a, b, alphabet="a-z") {
|
|||
|
||||
const aInv = Utils.modInv(a, m);
|
||||
const bInv = (m - b) % m;
|
||||
if (aInv === null)
|
||||
if (aInv === null || aInv === undefined)
|
||||
throw new OperationError("The value of `a` (" + a + ") must be coprime to " + m + ".");
|
||||
else return affineApplication(input, aInv, bInv, alphabet, decryptFn);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue