hash

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const (
	SHA1    = "SHA1"
	SHA256  = "SHA256"
	SHA384  = "SHA384"
	SHA512  = "SHA512"
	SHA3256 = "SHA3_256"
	SHA3384 = "SHA3_384"
	SHA3512 = "SHA3_512"
)

const

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

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

Hasher is a hash object

func New added in v1.0.3

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

New creates a new Hasher

func (*Hasher) GetHash

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

GetHash returns the underlying hash.Hash interface

func (*Hasher) Hash

func (h *Hasher) Hash(msg []byte) ([]byte, error)

Hash calculate the hash of the message

Jump to

Keyboard shortcuts

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