aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-07-16 14:07:32 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-07-16 14:07:32 +0200
commit3f264916dbfe346a71fa4182c9037332ac54f9d9 (patch)
tree94819bfb342195743f63321ee22f516df8d1fd22 /src/libutil/hash.hh
parent36a124260361ba8dfa43bf43a067dcc48064c93f (diff)
parent2d6d53bc87ef7468ad73431cf76123316f4c82bf (diff)
Merge remote-tracking branch 'origin/flakes'
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 23259dced..ad6093fca 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -18,6 +18,8 @@ const int sha1HashSize = 20;
const int sha256HashSize = 32;
const int sha512HashSize = 64;
+extern std::set<std::string> hashTypes;
+
extern const string base32Chars;
enum Base : int { Base64, Base32, Base16, SRI };
@@ -122,6 +124,7 @@ Hash compressHash(const Hash & hash, unsigned int newSize);
/* Parse a string representing a hash type. */
HashType parseHashType(const string & s);
+
/* Will return nothing on parse error */
std::optional<HashType> parseHashTypeOpt(const string & s);