MCPcopy Index your code
hub / github.com/apache/answer / verifyPassword

Method verifyPassword

internal/service/content/user_service.go:639–645  ·  view source on GitHub ↗

verifyPassword Compare whether the password is correct

(_ context.Context, loginPass, userPass string)

Source from the content-addressed store, hash-verified

637// verifyPassword
638// Compare whether the password is correct
639func (us *UserService) verifyPassword(_ context.Context, loginPass, userPass string) bool {
640 if len(loginPass) == 0 && len(userPass) == 0 {
641 return true
642 }
643 err := bcrypt.CompareHashAndPassword([]byte(userPass), []byte(loginPass))
644 return err == nil
645}
646
647// encryptPassword
648// The password does irreversible encryption.

Callers 4

EmailLoginMethod · 0.95
UserModifyPasswordMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected