Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine binds the functions of the BCrypt Crypto system and satisfies the crypto.EMCrypto interface. The parameter 'cost' is used to set the cost of the algorithm and should be set on a per-site basis.
func (*Engine) SecureSecret ¶
SecureSecret takes in a secret and generates a bcrypt hash from it. This is then returned for storage in the database.
func (*Engine) VerifySecret ¶
VerifySecret verifies a given secret against a given hash and returns either nil for a match or a crypto.ErrAuthorizationFailure in the case that the secret did not match the stored one.
Click to show internal directories.
Click to hide internal directories.