Closed
Description
micropython-hmac
uses micropython-hashlib
, which attempts to import various hash classes (sha1
, sha256
etc) from uhashlib
if they exist. For any missing class, it imports a pure Python implementation.
Now, the pure Python differ a bit in the API they expose, comparing to the implementations in uhashlib
itself. That wouldn't be of a problem, but the hmac
module later uses some of these APIs... So if your uhashlib
has e.g sha1
then you can't use hmac(digestmod=sha1)
.
Specifically, digest_size
, block_size
and copy
are missing (at least from what I've seen, possibly more missing attributes exist)