Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BcryptService ¶
type BcryptService struct { }
BcryptService is responsible for hashing/comparing passwords using the bcrypt algorithm
func (BcryptService) CheckPasswordHash ¶
func (service BcryptService) CheckPasswordHash(password string, hash string) bool
CheckPasswordHash verifies if the password matches the hashed value
func (BcryptService) HashPassword ¶
func (service BcryptService) HashPassword(password string) (string, error)
HashPassword hashes a password
type Service ¶
type Service interface { HashPassword(password string) (string, error) CheckPasswordHash(password string, hash string) bool }
Service is responsible for hashing and comparing hashed passwords
func NewBcryptService ¶
func NewBcryptService() Service
NewBcryptService creates a new instance of the bcrypt service
Click to show internal directories.
Click to hide internal directories.