aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-04-06 11:15:52 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-04-06 11:15:52 +0200
commitd7669fc974ad1616d5cd7178f91525f609d3971a (patch)
treefe4c211ed9727f3ea71ff818901994b8b21823f0 /src/model
parent00827a6c00a5e11c98931b0c2fcd0386f38ecd3b (diff)
Improved digest check and dump to be more usable.
Diffstat (limited to 'src/model')
-rwxr-xr-xsrc/model/python/sha512.py10
1 files 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()
#-------------------------------------------------------------------