hashreader

package
v1.74.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader wraps an io.Reader calculating a hash of the underlying reads.

func New

func New(r io.Reader, h hash.Hash) *Reader

New returns a new Reader using the given hash implementation.

func (*Reader) Read

func (r *Reader) Read(b []byte) (n int, err error)

Read reads the underlying reader and writes the hash of it.

func (*Reader) Sum

func (r *Reader) Sum() []byte

Sum returns the hash sum.

Jump to

Keyboard shortcuts

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