crypto

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MPL-2.0, MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandBytes

func RandBytes(c int) ([]byte, error)

func RandHexString

func RandHexString(bytesLen int) (string, error)

func ReaderHashSum added in v0.1.3

func ReaderHashSum(h hash.Hash, r io.Reader) ([]byte, error)

ReaderHashSum returns the computed sum from the reader's bytes.

The caller is responsible for reseting the input hasher if it reused.

func ReaderHashSumsEqual added in v0.1.3

func ReaderHashSumsEqual(h hash.Hash, readers ...io.Reader) (same bool, sums [][]byte, _ error)

ReaderHashSumsEqual returns the hashes of one or more io.Reader contents and indicates if they were all equal.

It will reset the input hasher prior to each use, but will not reset it before returning.

Types

This section is empty.

Jump to

Keyboard shortcuts

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