Fix error in prime_factors:
- Used number instead of num when the remaining value is a factor Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
8f00e6a45a
commit
8c7bc52d9a
2
rsa.py
2
rsa.py
@ -289,7 +289,7 @@ def prime_factors(number, base):
|
|||||||
if j != 0:
|
if j != 0:
|
||||||
factors.update({i: j})
|
factors.update({i: j})
|
||||||
if num > 2:
|
if num > 2:
|
||||||
factors.update({number: 1})
|
factors.update({int(num): 1})
|
||||||
|
|
||||||
print(factors)
|
print(factors)
|
||||||
def readKeyFile(keyName):
|
def readKeyFile(keyName):
|
||||||
|
Loading…
Reference in New Issue
Block a user