algorithm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MD5    = "md5"
	SHA1   = "sha1"
	SHA256 = "sha256"
	SHA512 = "sha512"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

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

func LookupName

func LookupName(name string) (Algorithm, error)

func MustLookupName

func MustLookupName(name string) Algorithm

func New

func New(name string, hasher Hasher) Algorithm

func NewUnknown

func NewUnknown(name string) Algorithm

func (Algorithm) Hash

func (a Algorithm) Hash(reader io.Reader) ([]byte, error)

func (Algorithm) Name

func (a Algorithm) Name() string

func (Algorithm) NewHash

func (a Algorithm) NewHash() hash.Hash

type Hasher

type Hasher func() hash.Hash

Jump to

Keyboard shortcuts

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