I'm trying to make a hmac hash with digestmode SHA1.
But I'm stuck at the digestmode..
Code: Select all
import hmac
from uhashlib import sha1
word = bytes("word", "UTF-8")
key = bytes("key", "UTF-8")
hash = hmac.new(key, word, digestmod=sha1)
AttributeError: 'sha1' object has no attribute 'digest_size'
Does somebody have a workaround or some advice on how to tackle this? Really appreciate it!