aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-01 18:34:18 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-01 18:34:18 -0400
commit263ccdd48923b730fd7e6f687583160d7b24039b (patch)
tree156305c1928adae6f67ff1aacd2c55a0a0097a24 /src/libutil/hash.hh
parentc8c4bcf90e065b47c3ee2984b1f8ff696da889af (diff)
Rename two hash constructors to proper functions
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 766009438..3e413a52c 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -39,9 +39,11 @@ struct Hash
Subresource Integrity hash expression). If the 'type' argument
is not present, then the hash type must be specified in the
string. */
- Hash(std::string_view s, std::optional<HashType> type);
+ static Hash parseAny(std::string_view s, std::optional<HashType> type);
// hash type must be part of string
- Hash(std::string_view s);
+ static Hash parseAnyPrefixed(std::string_view s);
+ // prefix parsed separately; non SRI hash
+ static Hash parseAnyUnprefixed(std::string_view s, HashType type);
static Hash fromSRI(std::string_view original);