diff options
Diffstat (limited to 'nix/libutil/hash.hh')
| -rw-r--r-- | nix/libutil/hash.hh | 8 |
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 | |||
| 51 | string printHash(const Hash & hash); | 51 | string printHash(const Hash & hash); |
| 52 | 52 | ||
| 53 | /* Parse a hexadecimal representation of a hash code. */ | 53 | /* Parse a hexadecimal representation of a hash code. */ |
| 54 | Hash parseHash(HashType ht, const string & s); | 54 | Hash 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. */ |
| 57 | unsigned int hashLength32(const Hash & hash); | 57 | unsigned int hashLength32(const Hash & hash); |
| @@ -63,13 +63,13 @@ string printHash32(const Hash & hash); | |||
| 63 | string printHash16or32(const Hash & hash); | 63 | string 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. */ |
| 66 | Hash parseHash32(HashType ht, const string & s); | 66 | Hash 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. */ |
| 69 | Hash parseHash16or32(HashType ht, const string & s); | 69 | Hash 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. */ |
| 72 | bool isHash(const string & s); | 72 | bool isHash(std::string_view s); |
| 73 | 73 | ||
| 74 | /* Compute the hash of the given string. */ | 74 | /* Compute the hash of the given string. */ |
| 75 | Hash hashString(HashType ht, const string & s); | 75 | Hash hashString(HashType ht, const string & s); |
