(password string)
| 22 | type AuthService struct{ BaseService } |
| 23 | |
| 24 | func hashPassword(password string) (string, error) { |
| 25 | bytes, err := bcrypt.GenerateFromPassword([]byte(password), 10) |
| 26 | return string(bytes), err |
| 27 | } |
| 28 | |
| 29 | func checkPasswordHash(password, hash string) bool { |
| 30 | err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) |
no outgoing calls
no test coverage detected