diff options
Diffstat (limited to 'src/libutil/hash.cc')
-rw-r--r-- | src/libutil/hash.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index 4b82f191e..c7ccb809d 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -9,7 +9,6 @@ #include "archive.hh" #include "parser.hh" #include "util.hh" -#include "istringstream_nocopy.hh" #include <sys/types.h> #include <sys/stat.h> @@ -17,6 +16,7 @@ namespace nix { + static size_t regularHashSize(HashType type) { switch (type) { case htMD5: return md5HashSize; @@ -27,6 +27,10 @@ static size_t regularHashSize(HashType type) { abort(); } + +std::set<std::string> hashTypes = { "md5", "sha1", "sha256", "sha512" }; + + Hash::Hash(HashType type) : type(type) { hashSize = regularHashSize(type); |