checksum

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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

func DefaultSHA256Verifier() (Verifier, error)

DefaultSHA256Verifier returns a default SHA256 Verifier.

Jump to

Keyboard shortcuts

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