summaryrefslogtreecommitdiff
path: root/nix/libutil/hash.hh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-23 16:33:38 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-27 23:42:20 +0200
commit8e6c1415d87272c0221ce328715fc0dd1dd3e032 (patch)
treeb873e8b22ddd2c486f428fae15bc18f95755f78e /nix/libutil/hash.hh
parent8dc6c387852bb9505be44567a5f56913633cc23a (diff)
downloadguix-patches-8e6c1415d87272c0221ce328715fc0dd1dd3e032.tar
guix-patches-8e6c1415d87272c0221ce328715fc0dd1dd3e032.tar.gz
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.
Diffstat (limited to 'nix/libutil/hash.hh')
-rw-r--r--nix/libutil/hash.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/nix/libutil/hash.hh b/nix/libutil/hash.hh
index 7357a34e1d..ac58651a02 100644
--- a/nix/libutil/hash.hh
+++ b/nix/libutil/hash.hh
@@ -16,7 +16,10 @@ typedef enum {
htMD5 = GCRY_MD_MD5,
htSHA1 = GCRY_MD_SHA1,
htSHA256 = GCRY_MD_SHA256,
- htSHA512 = GCRY_MD_SHA512
+ htSHA512 = GCRY_MD_SHA512,
+ htSHA3_256 = GCRY_MD_SHA3_256,
+ htSHA3_512 = GCRY_MD_SHA3_512,
+ htBLAKE2s_256 = GCRY_MD_BLAKE2S_256
} HashType;
struct Hash