blake2b

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashID = "b2b"
)

Variables

This section is empty.

Functions

func Register

func Register(algs h2hash.Algs)

Register registers a hash alg

Types

type Config

type Config struct {
	Key []byte
}

func NewConfig

func NewConfig() (*Config, error)

func ParseConfig

func ParseConfig(params string) (*Config, error)

ParseConfig loads a blake2b key config from params string

func (Config) String

func (c Config) String() string

type Hasher

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

Hasher implements h2hash.Hasher for blake2b

func New

func New(config Config) *Hasher

New creates a new blake2b hasher

func NewFromParams

func NewFromParams(params string) (*Hasher, error)

NewFromParams creates a blake2b hasher from params

func (*Hasher) Hash

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

func (*Hasher) ID

func (h *Hasher) ID() string

func (*Hasher) Verify

func (h *Hasher) Verify(msg []byte, msghash string) (bool, error)

Jump to

Keyboard shortcuts

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