secret

package
v2.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

func GenerateRandomString

func GenerateRandomString(n int) (string, error)

Types

type Hasher

type Hasher interface {
	HashString(str string) (string, error)
	HashMatchesString(hash, password string) bool
}
var HasherSecret Hasher

type Password

type Password struct {
}

func (*Password) HashMatchesString added in v2.0.4

func (p *Password) HashMatchesString(hash, password string) bool

func (*Password) HashString

func (p *Password) HashString(str string) (string, error)

Jump to

Keyboard shortcuts

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