aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/hash.cc5
-rw-r--r--src/libutil/hash.hh2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc
index 7d6b8d96e..1150e74ed 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -173,6 +173,11 @@ Hash Hash::parseAny(std::string_view original, std::optional<HashType> optType)
return Hash(rest, hashType, isSRI);
}
+Hash Hash::parseNonSRIUnprefixed(std::string_view s, HashType type)
+{
+ return Hash(s, type, false);
+}
+
Hash::Hash(std::string_view rest, HashType type, bool isSRI)
: Hash(type)
{
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index d321cc8e1..af11a028d 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -43,7 +43,7 @@ struct Hash
// hash type must be part of string
static Hash parseAnyPrefixed(std::string_view s);
// prefix parsed separately; non SRI hash
- static Hash parseAnyUnprefixed(std::string_view s, HashType type);
+ static Hash parseNonSRIUnprefixed(std::string_view s, HashType type);
static Hash parseSRI(std::string_view original);