I need a Hash function with a 256bit output (as long int).
First I thought I could use SHA256 from the hashlib but it has an String Output and I need a number to calcula
python 3.x update
import hashlib value = 'something to hash' t_value = value.encode('utf8') h = hashlib.sha256(t_value) h.hexdigest() n = int(h.hexdigest(),base=16) print(n)