Is a hmac-sha1 hash always 20 bytes long? Python code

Viewed 10867

Is the digest always 20 bytes long? len(hashed.digest()) seems to always be 20.

hashed = hmac.new(key, signature_base_string, sha)
print hashed.digest()
print len(hashed.digest())
i = 0
for c in hashed.digest():
    i = i + 1
    print ord(c)
print base64.b64encode(hashed.digest())
3 Answers
Related