With the aim of getting consistency, and removing the need to learn an additional term, replace uses of uPy/uPython with MPy/MicroPython. Rule of thumb was to use "MPy" abbreviation where "CPy" is used nearby, but the full word MicroPython otherwise. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
18 lines
327 B
Python
18 lines
327 B
Python
try:
|
|
import hashlib
|
|
except ImportError:
|
|
# MicroPython with hashlib module disabled.
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
try:
|
|
hashlib.md5
|
|
except AttributeError:
|
|
# MD5 is only available on some ports
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
md5 = hashlib.md5(b"hello")
|
|
md5.update(b"world")
|
|
print(md5.digest())
|