encryptPassword The password does irreversible encryption.
(_ context.Context, pass string)
| 647 | // encryptPassword |
| 648 | // The password does irreversible encryption. |
| 649 | func (us *UserService) encryptPassword(_ context.Context, pass string) (string, error) { |
| 650 | hashPwd, err := bcrypt.GenerateFromPassword([]byte(pass), bcrypt.DefaultCost) |
| 651 | // This encrypted string can be saved to the database and can be used as password matching verification |
| 652 | return string(hashPwd), err |
| 653 | } |
| 654 | |
| 655 | // UserChangeEmailSendCode user change email verification |
| 656 | func (us *UserService) UserChangeEmailSendCode(ctx context.Context, req *schema.UserChangeEmailSendCodeReq) ( |
no outgoing calls
no test coverage detected