1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 23:51:47 +02:00

Merge remote-tracking branch 'upstream/master' into hash-always-has-type

This commit is contained in:
John Ericson 2020-07-16 14:58:53 +00:00
commit 5ea817dace
108 changed files with 8157 additions and 1845 deletions

View file

@ -18,6 +18,8 @@ const int sha1HashSize = 20;
const int sha256HashSize = 32;
const int sha512HashSize = 64;
extern std::set<std::string> hashTypes;
extern const string base32Chars;
enum Base : int { Base64, Base32, Base16, SRI };
@ -119,6 +121,7 @@ Hash compressHash(const Hash & hash, unsigned int newSize);
/* Parse a string representing a hash type. */
HashType parseHashType(std::string_view s);
/* Will return nothing on parse error */
std::optional<HashType> parseHashTypeOpt(std::string_view s);