diff options
author | Carlo Nucera <carlo.nucera@protonmail.com> | 2020-07-02 11:34:40 -0400 |
---|---|---|
committer | Carlo Nucera <carlo.nucera@protonmail.com> | 2020-07-02 11:34:40 -0400 |
commit | b6b10b1d4cb1cd487bbb5d2cc063ca743ae79004 (patch) | |
tree | 80fd8a3bdb90a81cf740cef1ba127a9501081b78 /src | |
parent | ea48e3a5b5f1051c251184792417326c513bf00f (diff) |
Write the implementation for parseNonSRIUnprefixed
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/hash.cc | 5 | ||||
-rw-r--r-- | src/libutil/hash.hh | 2 |
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); |