hash

package
v0.0.0-...-4fac041 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

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

func New

func New(data []byte, alg crypto.Hash) (*Hash, error)

func NewRaw

func NewRaw(hash []byte, alg crypto.Hash) *Hash

func NewReader

func NewReader(r io.Reader, alg crypto.Hash) (h *Hash, read int64, err error)

func NewReaderN

func NewReaderN(r io.Reader, n int64, alg crypto.Hash) (h *Hash, read int64, err error)

func Parse

func Parse(s string) (*Hash, error)

func (*Hash) Equal

func (h *Hash) Equal(h2 *Hash) bool

func (*Hash) EqualData

func (h *Hash) EqualData(b []byte) bool

func (*Hash) EqualHash

func (h *Hash) EqualHash(hash []byte, alg crypto.Hash) bool

func (*Hash) EqualReader

func (h *Hash) EqualReader(r io.Reader) (bool, int64)

func (*Hash) EqualReaderN

func (h *Hash) EqualReaderN(r io.Reader, n int64) (bool, int64)

func (*Hash) EqualString

func (h *Hash) EqualString(s string) bool

func (*Hash) HashAlgorithm

func (h *Hash) HashAlgorithm() crypto.Hash

func (*Hash) HashAvailable

func (h *Hash) HashAvailable() bool

func (*Hash) HashBytes

func (h *Hash) HashBytes() []byte

func (*Hash) HashSize

func (h *Hash) HashSize() int

func (*Hash) Hasher

func (h *Hash) Hasher() hash.Hash

func (*Hash) String

func (h *Hash) String() string

Jump to

Keyboard shortcuts

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