summaryrefslogtreecommitdiff
path: root/nix/libutil/hash.hh
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libutil/hash.hh')
-rw-r--r--nix/libutil/hash.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/nix/libutil/hash.hh b/nix/libutil/hash.hh
index ac58651a028..1a6b35f074b 100644
--- a/nix/libutil/hash.hh
+++ b/nix/libutil/hash.hh
@@ -51,7 +51,7 @@ struct Hash
51string printHash(const Hash & hash); 51string printHash(const Hash & hash);
52 52
53/* Parse a hexadecimal representation of a hash code. */ 53/* Parse a hexadecimal representation of a hash code. */
54Hash parseHash(HashType ht, const string & s); 54Hash parseHash(HashType ht, std::string_view s);
55 55
56/* Returns the length of a base-32 hash representation. */ 56/* Returns the length of a base-32 hash representation. */
57unsigned int hashLength32(const Hash & hash); 57unsigned int hashLength32(const Hash & hash);
@@ -63,13 +63,13 @@ string printHash32(const Hash & hash);
63string printHash16or32(const Hash & hash); 63string printHash16or32(const Hash & hash);
64 64
65/* Parse a base-32 representation of a hash code. */ 65/* Parse a base-32 representation of a hash code. */
66Hash parseHash32(HashType ht, const string & s); 66Hash parseHash32(HashType ht, std::string_view s);
67 67
68/* Parse a base-16 or base-32 representation of a hash code. */ 68/* Parse a base-16 or base-32 representation of a hash code. */
69Hash parseHash16or32(HashType ht, const string & s); 69Hash parseHash16or32(HashType ht, std::string_view s);
70 70
71/* Verify that the given string is a valid hash code. */ 71/* Verify that the given string is a valid hash code. */
72bool isHash(const string & s); 72bool isHash(std::string_view s);
73 73
74/* Compute the hash of the given string. */ 74/* Compute the hash of the given string. */
75Hash hashString(HashType ht, const string & s); 75Hash hashString(HashType ht, const string & s);