hash

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package hash provides functions for computing and comparing one-way hashes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

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

Hash represents a one-way hash of a string value.

func New

func New(s string) Hash

New returns a one-way hash of s.

func (Hash) Compare

func (h Hash) Compare(o string) error

Compare compares o with the hashed value in h and returns an error if the values don't match.

func (Hash) LogValue

func (h Hash) LogValue() slog.Value

Jump to

Keyboard shortcuts

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