ComparePassword returns true when the given plaintext password matches the encrypted pwd
(pwd string)
| 29 | |
| 30 | // ComparePassword returns true when the given plaintext password matches the encrypted pwd |
| 31 | func (u *User) ComparePassword(pwd string) error { |
| 32 | return bcrypt.CompareHashAndPassword([]byte(u.Password), []byte(pwd)) |
| 33 | } |
no outgoing calls