From d7669fc974ad1616d5cd7178f91525f609d3971a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Fri, 6 Apr 2018 11:15:52 +0200 Subject: Improved digest check and dump to be more usable. --- src/model/python/sha512.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/model/python/sha512.py b/src/model/python/sha512.py index bca62af..672dc73 100755 --- a/src/model/python/sha512.py +++ b/src/model/python/sha512.py @@ -290,12 +290,16 @@ def compare_digests(digest, expected): if (digest != expected): print("Error:") print("Got:") - print(digest) + for i in digest: + print("0x%016x " % (i), end="") + print() print("Expected:") - print(expected) + for i in expected: + print("0x%016x " % (i), end="") + print() else: print("Test case ok.") - + print() #------------------------------------------------------------------- -- cgit v1.2.3