[Cryptech-Commits] [core/hash/sha512] branch clock_speed updated: Improved digest check and dump to be more usable.

git at cryptech.is git at cryptech.is
Fri Apr 6 09:16:01 UTC 2018


This is an automated email from the git hooks/post-receive script.

joachim at secworks.se pushed a commit to branch clock_speed
in repository core/hash/sha512.

The following commit(s) were added to refs/heads/clock_speed by this push:
     new d7669fc  Improved digest check and dump to be more usable.
d7669fc is described below

commit d7669fc974ad1616d5cd7178f91525f609d3971a
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Fri Apr 6 11:15:52 2018 +0200

    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()
 
 
 #-------------------------------------------------------------------

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list