aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 1b626dd85..56b5938b3 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -20,7 +20,7 @@ const int sha512HashSize = 64;
extern std::set<std::string> hashTypes;
-extern const string base32Chars;
+extern const std::string base32Chars;
enum Base : int { Base64, Base32, Base16, SRI };
@@ -107,10 +107,10 @@ public:
};
/* Helper that defaults empty hashes to the 0 hash. */
-Hash newHashAllowEmpty(std::string hashStr, std::optional<HashType> ht);
+Hash newHashAllowEmpty(std::string_view hashStr, std::optional<HashType> ht);
/* Print a hash in base-16 if it's MD5, or base-32 otherwise. */
-string printHash16or32(const Hash & hash);
+std::string printHash16or32(const Hash & hash);
/* Compute the hash of the given string. */
Hash hashString(HashType ht, std::string_view s);
@@ -135,7 +135,7 @@ HashType parseHashType(std::string_view s);
std::optional<HashType> parseHashTypeOpt(std::string_view s);
/* And the reverse. */
-string printHashType(HashType ht);
+std::string printHashType(HashType ht);
union Ctx;