checksum

package
v0.0.0-...-c723220 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedHashLength = fmt.Errorf("unsupported hash length")

Functions

func CompareHashWithChecksumFile

func CompareHashWithChecksumFile(srcFilename, srcFilePath, checksumFilePath string) (bool, error)

CompareHashWithChecksumFile compares the computed hash of a file with the hashes in a checksum file.

func ComputeFileHash

func ComputeFileHash(filePath string, hashFunc func() hash.Hash) (string, error)

func DetermineHashFunc

func DetermineHashFunc(checksumFilePath string) (func() hash.Hash, error)

DetermineHashFunc determines the hash function to use based on the checksum file and the lengths of the hashes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL