Remove assumption of 26 as modulus
This commit is contained in:
parent
7eb887ca51
commit
9c696b523d
@ -1275,7 +1275,7 @@ class Utils {
|
||||
static modInv(x, y) {
|
||||
x %= y;
|
||||
for (let i = 1; i < y; i++) {
|
||||
if ((x * i) % 26 === 1) {
|
||||
if ((x * i) % y === 1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user