mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Add typehints ciphers and bool alg (#3264)
* updating DIRECTORY.md * updating DIRECTORY.md * Fixed accidental commit of file I have't touched * fixup! Format Python code with psf/black push * updating DIRECTORY.md * updating DIRECTORY.md * Fixed some suggested coding style issues * Update rsa_key_generator.py * Update rsa_key_generator.py Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
def gcd(a, b):
|
||||
def gcd(a: int, b: int) -> int:
|
||||
while a != 0:
|
||||
a, b = b % a, a
|
||||
return b
|
||||
|
||||
|
||||
def findModInverse(a, m):
|
||||
def findModInverse(a: int, m: int) -> int:
|
||||
if gcd(a, m) != 1:
|
||||
return None
|
||||
u1, u2, u3 = 1, 0, a
|
||||
|
Reference in New Issue
Block a user