GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Python/ciphers/cryptomath_module.py at master · jusing-es/Python Expand file tree/ Copy pathcryptomath_module.pyMore file actions 15 lines (13 loc) · 372 Bytes / Copy pathcryptomath_module.pyFile metadata and controls15 lines (13 loc) · 372 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def gcd(a: int, b: int) -> int: while a != 0: a, b = b % a, a return b def findModInverse(a: int, m: int) -> int: if gcd(a, m) != 1: return None u1, u2, u3 = 1, 0, a v1, v2, v3 = 0, 1, m while v3 != 0: q = u3 // v3 v1, v2, v3, u1, u2, u3 = (u1 - q * v1), (u2 - q * v2), (u3 - q * v3), v1, v2, v3 return u1 % m |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |