From 6ce8a51993e0dfd8feebb51ede67c479c8a78e96 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 6 Sep 2022 10:49:19 +0200 Subject: Crypto: Add SHA512 hasher Needed by the content-in-CAS git map to check fetched archives' checksums. SHA1 and SHA256 hashers are already implemented. --- test/buildtool/crypto/hasher.test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/buildtool/crypto') diff --git a/test/buildtool/crypto/hasher.test.cpp b/test/buildtool/crypto/hasher.test.cpp index 594e4504..45f24db7 100644 --- a/test/buildtool/crypto/hasher.test.cpp +++ b/test/buildtool/crypto/hasher.test.cpp @@ -39,4 +39,12 @@ TEST_CASE("Hasher", "[crypto]") { bytes, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"); } + + SECTION("SHA-512") { + // same as: echo -n test | sha512sum + test_increment_hash( + bytes, + "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27a" + "c185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"); + } } -- cgit v1.2.3