hasher

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Progress io.Writer
}

Client can be initialized with an io.Writer to track progress. When it is set, an io.MultiWriter will be used to write to it.

func (*Client) Hash

func (c *Client) Hash(h hash.Hash, r io.Reader) (string, error)

Hash returns the checksum of the data from the provided io.Reader.

func (*Client) Md5

func (c *Client) Md5(r io.Reader) (string, error)

Md5 returns the MD5 checksum of the data from the provided io.Reader.

func (*Client) Sha1

func (c *Client) Sha1(r io.Reader) (string, error)

Sha1 returns the SHA1 checksum of the data from the provided io.Reader.

func (*Client) Sha224

func (c *Client) Sha224(r io.Reader) (string, error)

Sha224 returns the SHA224 checksum of the data from the provided io.Reader.

func (*Client) Sha256

func (c *Client) Sha256(r io.Reader) (string, error)

Sha256 returns the SHA256 checksum of the data from the provided io.Reader.

func (*Client) Sha384

func (c *Client) Sha384(r io.Reader) (string, error)

Sha384 returns the SHA384 checksum of the data from the provided io.Reader.

func (*Client) Sha512

func (c *Client) Sha512(r io.Reader) (string, error)

Sha512 returns the SHA512 checksum of the data from the provided io.Reader.

Jump to

Keyboard shortcuts

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