This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
hashlib.sha1 giving incorrect results #194
Open
Description
MicroPython v1.9.2-273-g56f18602 on 2017-09-25; ESP32 module with ESP32
Type "help()" for more information.
>>> import binascii, hashlib
>>> hash = hashlib.sha1(b'mango')
>>> binascii.hexlify(hash.digest())
b'b19f233f1f6b38edc052ea9de39f3fd0c78fefba'
But on normal Python it's:
Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:09:58)
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii, hashlib
>>> hash = hashlib.sha1(b'mango')
>>> binascii.hexlify(hash.digest())
b'934aae49f648ed870c9c421829f4cece6643cf86'
Oddly, the value on version "MicroPython v1.9.2-270-g14fb53e0 on 2017-09-11; ESP32 module with ESP32" as reported in issue #178 is correct, so there has been a regression.
Metadata
Metadata
Assignees
Labels
No labels