摘要的長度總是20字節嗎? len(hashed.digest())似乎總是20.hmac-sha1散列長度總是20字節嗎? Python代碼
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())
[是的](https://secure.wikimedia.org/wikipedia/en/wiki/Sha1) –