Module nix_compat::nixhash
source · Modules§
Enums§
- A Nix CAHash describes a content-addressed hash of a path.
- Representation for the supported hash modes.
- Errors related to NixHash construction.
- This are the hash algorithms supported by cppnix.
- NixHash represents hashes known by Nix.
Functions§
- Decode a plain digest depending on the hash algo specified externally. hexlower, nixbase32 and base64 encodings are supported - the encoding is inferred from the input length.
- Parses a Nix hash string ($algo:$digest) to a NixHash.
- Parses a Nix SRI string to a NixHash. Contrary to the SRI spec, Nix doesn’t have an understanding of passing multiple hashes (with different algos) in SRI hashes. It instead simply cuts everything off after the expected length for the specified algo, and tries to parse the rest in permissive base64 (allowing missing padding).
- Nix allows specifying hashes in various encodings, and magically just derives the encoding. This function parses strings to a NixHash.
Type Aliases§
- convenience Result type for all nixhash parsing Results.