checksum

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBufferSize = 64 * datasize.KB

DefaultBufferSize is the size of the default internal buffer used by Checksum.

Variables

This section is empty.

Functions

func Checksum

func Checksum(reader io.Reader) (string, error)

Checksum reads from reader and returns the hash of the bytes as a hex string. Checksum buffers from reader internally.

func ChecksumBuffer

func ChecksumBuffer(reader io.Reader, buffer []byte) (string, error)

ChecksumBuffer reads from reader and returns the hash of the bytes as a hex string. ChecksumBuffer uses the buffer argument to buffer I/O from the reader to the hasher. If the buffer passed is zero-length, this function will panic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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