Documentation
¶
Overview ¶
Package checksum provides functions for computing checksums algorithms and verifying.
Package checksum provides functions for computing checksums algorithms and verifying.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Verifier ¶
type Verifier interface {
// Wrap returns an io.ReadCloser that transparently verifies the checksum
// when the returned reader is closed. This enables streaming verification
// without buffering the entire content in memory.
Wrap(io.ReadCloser, string) io.ReadCloser
// ComputeAndWrap returns a reader that computes the checksum while reading.
ComputeAndWrap(r io.Reader) (wrappedReader io.Reader, getHash func() (string, error))
}
Verifier defines the interface for computing and verifying checksums.
func DefaultSHA256Verifier ¶
DefaultSHA256Verifier returns a default SHA256 Verifier.
Click to show internal directories.
Click to hide internal directories.