Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RequestQueueKey specifies the redis key that will be used for the request queue. RequestQueueKey = "gocrypt:RequestQueue" // ResponseKeyPrefix specifies the redis key prefix that will be used for response publishing. ResponseKeyPrefix = "gocrypt:Response:" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemotePasswordHasher ¶
type RemotePasswordHasher struct {
// contains filtered or unexported fields
}
RemotePasswordHasher performs password hashing using a remote gocrypt hashing agent accessible through the provided redis pool.
func New ¶
New returns a PasswordHasher instance relying on a remote gocrypt agent to perform the hashing. This validates the connection and cost, and returns an error if there is a problem.
func (RemotePasswordHasher) HashPassword ¶
func (r RemotePasswordHasher) HashPassword(password string) (hash string, err error)
HashPassword hashes the provided password using a remote gocrypt agent.
func (RemotePasswordHasher) ValidatePassword ¶
func (r RemotePasswordHasher) ValidatePassword(password string, hash string) (isValid bool, err error)
ValidatePassword validates the password against the provided password hash using a remote gocrypt agent.
Click to show internal directories.
Click to hide internal directories.