auth

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBcryptPasswordProvider

func NewBcryptPasswordProvider(cost int) *bcryptPasswordProvider

func NewHashPasswordProvider added in v0.16.0

func NewHashPasswordProvider(hashFactor func() hash.Hash) *hashPasswordProvider

func NewSha1PasswordProvider added in v0.16.0

func NewSha1PasswordProvider() *hashPasswordProvider

Types

type HashPasswordProvider added in v0.16.0

type HashPasswordProvider interface {
	Generate(password []byte, salt []byte) ([]byte, error)
	Compare(hashedPassword, password []byte, salt []byte) error
}

type PasswordProvider

type PasswordProvider interface {
	Generate(password []byte) ([]byte, error)
	Compare(hashedPassword, password []byte) error
}

Jump to

Keyboard shortcuts

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