MCPcopy Create free account
hub / github.com/devinterface/startersaas-go-api / hashPassword

Function hashPassword

services/auth.service.go:24–27  ·  view source on GitHub ↗
(password string)

Source from the content-addressed store, hash-verified

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

Callers 3

UpdatePasswordMethod · 0.85
SignupMethod · 0.85
ResetPasswordMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected