Closed cositotito closed 2 years ago
import hmac import hashlib import time import urequests import json
secret="345fg-dfg" word="536" signature = hmac.new(secret, word.encode(), digestmod=hashlib.sha256).hexdigest().upper()
Traceback (most recent call last):
File "
Fwiw, I ran into the same issue and pushed a PR that fixes this for me. Let's see what the code review says.
Should be fixed by f95260d7e3c123a8b1907ded095e4c25e4251085
hello all, I have a problem when using 'import hmac' and I try to use it on my esp32
before using it, I install it and it installs correctly, the code is the following: import upip upip.install ("hmac")
the code is the following to use hmac: digest = hmac.new (s.decode ("base64"), a, hashlib.sha3_256) .digest ()
the error that prints to me on my console: Traceback (most recent call last): File "", line 1, in
AttributeError: 'module' object has no attribute 'new'
How can I use the new or remove this error? I would appreciate the help