Python BaseHash accepts only integer

Viewed 158

Im trying to hash a password using python's BaseHash as following:

import basehash

hash_fn = basehash.base36() 
hash_value = hash_fn.hash("1") # returns 'M8YZRZ'
unhashed = hash_fn.unhash('M8YZRZ') # returns 1

when im trying to hash a strings such:

hash_value = hash_fn.hash("hellooo")

i get invalid literal for int() with base 10: 'hellooo'. To mention, i have search this error almost everywhere but cant find the solution. Whats wrong with this?

0 Answers
Related