1 parent a944183 commit 4a1c80cCopy full SHA for 4a1c80c
1 file changed
tests/extmod/sha256.py
@@ -0,0 +1,29 @@
1
+try:
2
+ import uhashlib as hashlib
3
+except ImportError:
4
+ import hashlib
5
+
6
7
+h = hashlib.sha256()
8
+print(h.digest())
9
10
11
+h.update(b"123")
12
13
14
15
+h.update(b"abcd" * 1000)
16
17
18
+print(hashlib.sha256(b"\xff" * 64).digest())
19
20
+# TODO: running .digest() several times in row is not supported()
21
+#h = hashlib.sha256(b'123')
22
+#print(h.digest())
23
24
25
+# TODO: partial digests are not supported
26
27
28
+#h.update(b'456')
29
0 commit comments