hashio

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: BSD-3-Clause, MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHash

func GetHash(name string) (hash.Hash, error)

Types

type Compressor

type Compressor func(io.Writer) (io.WriteCloser, error)

func GetCompressor

func GetCompressor(name string) (Compressor, error)

type Hasher

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

func NewHasher

func NewHasher(name string) (*Hasher, error)

func NewHasherReader

func NewHasherReader(hash string, target io.Reader) (io.Reader, *Hasher, error)

func NewHasherReaders

func NewHasherReaders(hashes []string, target io.Reader) (io.Reader, []*Hasher, error)

func NewHasherWriter

func NewHasherWriter(hash string, target io.Writer) (io.Writer, *Hasher, error)

func NewHasherWriters

func NewHasherWriters(hashes []string, target io.Writer) (io.Writer, []*Hasher, error)

func (*Hasher) Name

func (dh *Hasher) Name() string

func (*Hasher) Size

func (dh *Hasher) Size() int64

func (*Hasher) Sum

func (dh *Hasher) Sum(b []byte) []byte

func (*Hasher) Write

func (dh *Hasher) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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