HashPassword generates a bcrypt hash of the password using work factor 14.
(password []byte)
| 39 | |
| 40 | // HashPassword generates a bcrypt hash of the password using work factor 14. |
| 41 | func HashPassword(password []byte) ([]byte, error) { |
| 42 | return bcrypt.GenerateFromPassword(password, 14) |
| 43 | } |
| 44 | |
| 45 | // CheckPassword securely compares a bcrypt hashed password with its possible |
| 46 | // plaintext equivalent. Returns nil on success, or an error on failure. |
no outgoing calls