On Jan 16, 1:14 am, gert <gert.cuyk... at gmail.com> wrote: > from random import random > from hashlib import sha1 > s = sha1(random()).hexdigest() > > TypeError: object supporting the buffer API required, > > How does sha1 work in python3.0 please ? s = sha1(bytes(random(),'utf-8')).hexdigest() i found this, looks let say strange. But it works :)