mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Merge branch 'master' of https://github.com/TheAlgorithms/Python
This commit is contained in:
@ -20,7 +20,7 @@ class Onepad:
|
||||
'''Function to decrypt text using psedo-random numbers.'''
|
||||
plain = []
|
||||
for i in range(len(key)):
|
||||
p = (cipher[i]-(key[i])**2)/key[i]
|
||||
p = int((cipher[i]-(key[i])**2)/key[i])
|
||||
plain.append(chr(p))
|
||||
plain = ''.join([i for i in plain])
|
||||
return plain
|
||||
|
Reference in New Issue
Block a user