From 251b00457c02718373a03cd5c1aa04a67ba30711 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 19 Dec 2017 14:45:53 +1100 Subject: [PATCH] tests/extmod/uhashlib_sha256: Add test for hashing 56 bytes of data. --- tests/extmod/uhashlib_sha256.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/extmod/uhashlib_sha256.py b/tests/extmod/uhashlib_sha256.py index 3200e8f5c..676d47979 100644 --- a/tests/extmod/uhashlib_sha256.py +++ b/tests/extmod/uhashlib_sha256.py @@ -23,6 +23,9 @@ print(h.digest()) print(hashlib.sha256(b"\xff" * 64).digest()) +# 56 bytes is a boundary case in the algorithm +print(hashlib.sha256(b"\xff" * 56).digest()) + # TODO: running .digest() several times in row is not supported() #h = hashlib.sha256(b'123') #print(h.digest())