hash

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HMACHasher

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

HMACHasher implements Hasher using HMAC-SHA256.

func NewHMACHasher

func NewHMACHasher(key []byte) *HMACHasher

NewHMACHasher returns an HMACHasher keyed with the given secret.

func (*HMACHasher) Hash

func (h *HMACHasher) Hash(plaintext string) string

Hash returns the HMAC-SHA256 hex digest of plaintext.

type Hasher

type Hasher interface {
	Hash(plaintext string) string
}

Hasher defines the interface for hashing plaintext strings.

Jump to

Keyboard shortcuts

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