cred

package
v1.688.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argon2idCredManager added in v1.48.0

type Argon2idCredManager struct{}

func NewArgon2idCredManager added in v1.48.0

func NewArgon2idCredManager() *Argon2idCredManager

func (*Argon2idCredManager) GetHashedPassword added in v1.48.0

func (cm *Argon2idCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*Argon2idCredManager) IsPasswordCorrect added in v1.48.0

func (cm *Argon2idCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

type BcryptCredManager

type BcryptCredManager struct{}

func NewBcryptCredManager

func NewBcryptCredManager() *BcryptCredManager

func (*BcryptCredManager) GetHashedPassword

func (cm *BcryptCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*BcryptCredManager) IsPasswordCorrect

func (cm *BcryptCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

type CredManager

type CredManager interface {
	GetHashedPassword(password string, userSalt string, organizationSalt string) string
	IsPasswordCorrect(password string, passwordHash string, userSalt string, organizationSalt string) bool
}

func GetCredManager

func GetCredManager(passwordType string) CredManager

type Md5UserSaltCredManager

type Md5UserSaltCredManager struct{}

func NewMd5UserSaltCredManager

func NewMd5UserSaltCredManager() *Md5UserSaltCredManager

func (*Md5UserSaltCredManager) GetHashedPassword

func (cm *Md5UserSaltCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*Md5UserSaltCredManager) IsPasswordCorrect

func (cm *Md5UserSaltCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

type Pbkdf2SaltCredManager added in v1.37.0

type Pbkdf2SaltCredManager struct{}

func NewPbkdf2SaltCredManager added in v1.37.0

func NewPbkdf2SaltCredManager() *Pbkdf2SaltCredManager

func (*Pbkdf2SaltCredManager) GetHashedPassword added in v1.37.0

func (cm *Pbkdf2SaltCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*Pbkdf2SaltCredManager) IsPasswordCorrect added in v1.37.0

func (cm *Pbkdf2SaltCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

type PlainCredManager

type PlainCredManager struct{}

func NewPlainCredManager

func NewPlainCredManager() *PlainCredManager

func (*PlainCredManager) GetHashedPassword

func (cm *PlainCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*PlainCredManager) IsPasswordCorrect

func (cm *PlainCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

type Sha256SaltCredManager

type Sha256SaltCredManager struct{}

func NewSha256SaltCredManager

func NewSha256SaltCredManager() *Sha256SaltCredManager

func (*Sha256SaltCredManager) GetHashedPassword

func (cm *Sha256SaltCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*Sha256SaltCredManager) IsPasswordCorrect

func (cm *Sha256SaltCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

type Sha512SaltCredManager added in v1.518.0

type Sha512SaltCredManager struct{}

func NewSha512SaltCredManager added in v1.518.0

func NewSha512SaltCredManager() *Sha512SaltCredManager

func (*Sha512SaltCredManager) GetHashedPassword added in v1.518.0

func (cm *Sha512SaltCredManager) GetHashedPassword(password string, userSalt string, organizationSalt string) string

func (*Sha512SaltCredManager) IsPasswordCorrect added in v1.518.0

func (cm *Sha512SaltCredManager) IsPasswordCorrect(plainPwd string, hashedPwd string, userSalt string, organizationSalt string) bool

Jump to

Keyboard shortcuts

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