aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-08 01:11:17 +0000
committerlloyd <[email protected]>2015-01-08 01:11:17 +0000
commit718d577455c2e431e32064950f2612e1381c275a (patch)
treef7fbbad052a82c9f17309f64f3de7e2cec5ad603 /src/tests
parent624787ec08f215a7b0be51ceeeb211a717bf7f50 (diff)
Add SHA-512/256
Define some new functions for copying out arrays of words and use them across hashes.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/data/hash/sha2_64.vec4
-rw-r--r--src/tests/test_hash.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/data/hash/sha2_64.vec b/src/tests/data/hash/sha2_64.vec
index 189e55ef5..e8d44e990 100644
--- a/src/tests/data/hash/sha2_64.vec
+++ b/src/tests/data/hash/sha2_64.vec
@@ -42,3 +42,7 @@ Out = 8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7FA17299AEADB6889018501D289E49
In = 3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
Out = 72EC1EF1124A45B047E8B7C75A932195135BB61DE24EC0D1914042246E0AEC3A2354E093D76F3048B456764346900CB130D2A4FD5DD16ABB5E30BCB850DEE843
+[SHA-512-256]
+
+In =
+Out = C672B8D1EF56ED28AB87C3622C5114069BDD3AD7B8F9737498D0C01ECEF0967A
diff --git a/src/tests/test_hash.cpp b/src/tests/test_hash.cpp
index 6077bf906..ec14d6dd4 100644
--- a/src/tests/test_hash.cpp
+++ b/src/tests/test_hash.cpp
@@ -58,7 +58,8 @@ size_t hash_test(const std::string& algo,
if(h != hex_decode_locked(out_hex))
{
- std::cout << algo << " " << provider << " got " << hex_encode(h) << " != " << out_hex << "\n";
+ std::cout << algo << " " << provider << " got " << hex_encode(h) << " != " << out_hex
+ << " (with discarded input)\n";
++fails;
}
}