HMAC algorithm implementation
My objective now is to improve it so it may serve as a reference to anyone trying to implement or understand it.


In light of that goal I would have thought it made more sense to use the documented test vectors of RFC 2202 rather than make up your own one.




### hash (key xor opad || hash ( (key xor ipad)||message ) )
part2 = K_opad + hash1
print("hash (key xor opad || hash ( (key XOR ipad)||message ) ):\n"+part2.hex())
hash_final = hash(part2)
print("\n\nFinal Hash:\n"+hash_final.hex())



The comment and the first print describe hash_final, not part2. IMO this is a bug, albeit a minor one.