8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d32349c commit b2084d3Copy full SHA for b2084d3
tests/extmod/uhashlib_sha1.py
@@ -19,3 +19,10 @@
19
sha1 = hashlib.sha1(b'hello')
20
sha1.update(b'world')
21
print(sha1.digest())
22
+
23
+sha1 = hashlib.sha1(b'hello')
24
+try:
25
+ sha1.update(u'world')
26
+except TypeError as e:
27
+ print("TypeError")
28
+print(sha1.digest())
tests/extmod/uhashlib_sha256.py
@@ -23,6 +23,13 @@
print(hashlib.sha256(b"\xff" * 64).digest())
+sha256 = hashlib.sha256(b'hello')
+ sha256.update(u'world')
29
30
31
+print(sha256.digest())
32
33
# TODO: running .digest() several times in row is not supported()
34
#h = hashlib.sha256(b'123')
35
#print(h.digest())
0 commit comments