Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHasher ¶ added in v0.1.5
func AddHasher(h Hasher)
AddHasher adds a new hash algorithm to the list.
func GetAllHasherNames ¶ added in v0.1.5
func GetAllHasherNames() []string
GetAllHasherNames returns a list of all available hash algorithms.
func GetDefaultHashAlgorithm ¶ added in v0.1.5
func GetDefaultHashAlgorithm() string
GetDefaultHashAlgorithm returns the default hash algorithm.
Types ¶
type Hasher ¶ added in v0.1.5
type Hasher struct { Algorithm common.Algorithm Name string Extension string Keyed bool Compute func(reader io.Reader, key string, fileAndRangeSpec common.FileAndRangeSpec) (string, error) OutputLen int Validate func(key string) error AcceptsFile func(fileName string) bool ParseChecksumLine func(line string) (hashValue string, fileAndRangeSpec common.FileAndRangeSpec, byteCount int64, err error) }
Hasher represents a hash function.
func GetAllHashers ¶ added in v0.1.5
func GetAllHashers() []Hasher
GetAllHashers returns a list of all available hashers.
Click to show internal directories.
Click to hide internal directories.