aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-06-30 14:10:30 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-06-30 14:10:30 -0400
commitb798efb829415eb47a532e9479523afdff74eca7 (patch)
treee683c5de61bd6db343f8a8222d0653f2899952fc /src/libutil/hash.hh
parenta1f66d1d9e70d4204a3686002b02277465a6b7ab (diff)
WIP initial design
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index a55295912..42bd585a2 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -40,13 +40,16 @@ struct Hash
is not present, then the hash type must be specified in the
string. */
Hash(std::string_view s, std::optional<HashType> type);
- // type must be provided
- Hash(std::string_view s, HashType type);
// hash type must be part of string
Hash(std::string_view s);
+private:
+ // type must be provided, s must not include <type> prefix
+ Hash(std::string_view s, HashType type);
+
void init();
+public:
/* Check whether a hash is set. */
operator bool () const { return (bool) type; }