mirror of
https://github.com/NixOS/nix
synced 2025-07-04 23:51:47 +02:00
Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into better-ca-parse-errors
This commit is contained in:
commit
cc0d77f8c9
138 changed files with 8552 additions and 2192 deletions
|
@ -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 };
|
||||
|
@ -124,6 +126,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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue