From 8e6c1415d87272c0221ce328715fc0dd1dd3e032 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 23 Jun 2020 16:33:38 +0200 Subject: daemon: Recognize SHA3 and BLAKE2s. * nix/libutil/hash.hh (HashType): Add htSHA3_256, htSHA3_512, and htBLAKE2s_256. * nix/libutil/hash.cc (parseHashType, printHashType): Recognize them. * tests/store.scm ("add-to-store"): Test these algorithms. --- tests/store.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/store.scm b/tests/store.scm index 06f7939657..ee3e01f33b 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -116,7 +116,7 @@ (list (stat:uid s) (stat:perms s)))) (test-equal "add-to-store" - '("sha1" "sha256" "sha512") + '("sha1" "sha256" "sha512" "sha3-256" "sha3-512" "blake2s-256") (let* ((file (search-path %load-path "guix.scm")) (content (call-with-input-file file get-bytevector-all))) (map (lambda (hash-algo) @@ -125,7 +125,7 @@ (bytevector=? (call-with-input-file file get-bytevector-all) content) hash-algo))) - '("sha1" "sha256" "sha512")))) + '("sha1" "sha256" "sha512" "sha3-256" "sha3-512" "blake2s-256")))) (test-equal "add-data-to-store" #vu8(1 2 3 4 5) -- cgit v1.2.3