hasher

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher int

Hasher is an enumeration of hash types that are allowed.

 ENUM(
	SHA1,
	SHA256,
	SHA512,

)

const (
	// HasherSHA1 is a Hasher of type SHA1.
	HasherSHA1 Hasher = iota
	// HasherSHA256 is a Hasher of type SHA256.
	HasherSHA256
	// HasherSHA512 is a Hasher of type SHA512.
	HasherSHA512
)

func ParseHasher

func ParseHasher(name string) (Hasher, error)

ParseHasher attempts to convert a string to a Hasher.

func (Hasher) MarshalText

func (x Hasher) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (Hasher) String

func (x Hasher) String() string

String implements the Stringer interface.

func (*Hasher) UnmarshalText

func (x *Hasher) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

Jump to

Keyboard shortcuts

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