ihash

package
v0.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompareSumFunc

type CompareSumFunc func(b, sum []byte) error

CompareSumFunc returns if the sum and the hash of b matches or not. If matches, it returns nil error. If not matches, it returns non-nil error.

type EqualSumFunc

type EqualSumFunc func(b, sum []byte) bool

EqualSumFunc returns if the sum and the hash of b matches or not. Unlike CompareSumFunc, it returns true or false.

type HMACCompareSumFunc

type HMACCompareSumFunc func(msg, key, sum []byte) error

HMACCompareSumFunc returns if the sum and the HMAC of msg matches or not. If matches, it returns nil error. If not matches, it returns non-nil error.

type HMACEqualSumFunc

type HMACEqualSumFunc func(msg, key, sum []byte) bool

HMACEqualSumFunc returns if the sum and the HMAC of msg matches or not. Unlike HMACCompareSumFunc, it returns true or false.

type HMACSumFunc

type HMACSumFunc func(msg, key []byte) []byte

HMACSumFunc returns HMAC of the msg.

type PWHasher

type PWHasher interface {
	Sum(password []byte) ([]byte, error)
	Equal(hashedPW, pw []byte) bool
	Compare(hashedPW, pw []byte) error
}

PWHasher is the interface for password hash.

type SumFunc

type SumFunc func(b []byte) []byte

SumFunc returns hash sum of the b.

Jump to

Keyboard shortcuts

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