Documentation
¶
Index ¶
Constants ¶
View Source
const HashPattern = `[0-9a-df-np-sv-z]{32}`
narInfoHashPattern defines the valid characters for a Nix32 encoded hash. Nix32 uses a 32-character alphabet excluding 'e', 'o', 'u', and 't'. Valid characters: 0-9, a-d, f-n, p-s, v-z Hashes must be exactly 32 characters long.
Variables ¶
View Source
var ( // ErrInvalidHash is returned if the hash is invalid. ErrInvalidHash = errors.New("invalid narinfo hash") )
Functions ¶
func ValidateHash ¶
ValidateHash validates the given hash according to Nix32 encoding requirements. A valid hash must: - Be exactly 32 characters long - Contain only characters from the Nix32 alphabet ('0'-'9', 'a'-'z' excluding 'e', 'o', 'u', 't').
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.