crypter

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSecureToken

func GenerateSecureToken(length int) (string, error)

func GenerateSecureTokenWithReader

func GenerateSecureTokenWithReader(length int, randObj io.Reader) (string, error)

Types

type Crypter

type Crypter interface {
	GenerateHash(str string) string
	CompareHash(hashStr string, str string) bool
}

type CustomCrypter

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

func GetDefaultCrypter

func GetDefaultCrypter() *CustomCrypter

func (*CustomCrypter) CompareHash

func (c *CustomCrypter) CompareHash(hashStr string, str string) bool

func (*CustomCrypter) GenerateHash

func (c *CustomCrypter) GenerateHash(str string) string

Jump to

Keyboard shortcuts

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