hash_dev #10
10
auth.py
10
auth.py
|
@ -29,10 +29,14 @@ def write_pwdb(pwdb, PWDB_PATH):
|
|||
json.dump(pwdb, pwdb_file)
|
||||
|
||||
def hash_password(password):
|
||||
hash = 0
|
||||
hash_1 = 0
|
||||
for c in password.split():
|
||||
hash += ord(c)
|
||||
return hash
|
||||
hash_1 += ord(c)
|
||||
hash_2 = int(log(hash_1) * 100000)
|
||||
hash_3 = 1
|
||||
for d in list(str(hash_2)):
|
||||
hash_3 *= ord(d)
|
||||
return hash_3
|
||||
|
||||
if __name__ == "__main__":
|
||||
PWDB_PATH = 'pwdb.json'
|
||||
|
|
Loading…
Reference in a new issue