summaryrefslogtreecommitdiff
path: root/nix/libutil/hash.hh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-12 11:42:12 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-12 11:48:46 +0100
commite82e55e58c67b0215e768c4612ca542bc670f633 (patch)
tree856c4512fa1fbde59c1d9845c5a763ef8c4a14b4 /nix/libutil/hash.hh
parent98bd851ee891ca4a84e061fe1e78ba78c292b096 (diff)
parente35dff973375266db253747140ddf25084ecddc2 (diff)
downloadpatches-e82e55e58c67b0215e768c4612ca542bc670f633.tar
patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libutil/hash.hh')
-rw-r--r--nix/libutil/hash.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/nix/libutil/hash.hh b/nix/libutil/hash.hh
index 8f099c4f07..6b5e47cd8a 100644
--- a/nix/libutil/hash.hh
+++ b/nix/libutil/hash.hh
@@ -7,19 +7,20 @@
namespace nix {
-typedef enum { htUnknown, htMD5, htSHA1, htSHA256 } HashType;
+typedef enum { htUnknown, htMD5, htSHA1, htSHA256, htSHA512 } HashType;
const int md5HashSize = 16;
const int sha1HashSize = 20;
const int sha256HashSize = 32;
+const int sha512HashSize = 64;
extern const string base32Chars;
struct Hash
{
- static const unsigned int maxHashSize = 32;
+ static const unsigned int maxHashSize = 64;
unsigned int hashSize;
unsigned char hash[maxHashSize];