Mar-22-2018, 01:21 PM
(Mar-21-2018, 01:41 PM)ODIS Wrote: You're right.
I think the problem is that he's converting to the bytes the "key" string instead of "c41d9eac" :)
Thanks. This was indeed the problem.
Original:
import hashlib key = 'c41d9eac' print(hmac.new(b'key', b'this is the life', hashlib.sha1).hexdigest())Solution:
import hashlib key = b'c41d9eac' raw = 'this is the life' print(hmac.new(key, raw.encode(), hashlib.sha1).hexdigest())Thanks again for your help.
R.