I try to hash some unicode strings:
hashlib.sha1(s).hexdigest() UnicodeEncodeError: \'ascii\' codec can\'t encode characters in position 0-81: ordinal not in ra
You hash bytes, not strings. So you gotta know what bytes you really want to hash, for example an utf8 memory representation of the string or a utf16 memory representation of the string, etc.
bytes
strings