Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

密码加密没加盐? #1

Closed
killernova opened this issue Jul 11, 2018 · 1 comment
Closed

密码加密没加盐? #1

killernova opened this issue Jul 11, 2018 · 1 comment

Comments

@killernova
Copy link

如题:

func EncodePassword(pwd []byte) string {
	hash := sha256.New()
	hash.Write(pwd)
	md := hash.Sum(nil)
	return hex.EncodeToString(md)
}
@chenhg5
Copy link
Collaborator

chenhg5 commented Jul 11, 2018

@killernova 感谢提醒。已修改为bcrypt算法。 #bc2532c

@chenhg5 chenhg5 closed this as completed Jul 23, 2018
chenhg5 pushed a commit that referenced this issue Jan 10, 2020
chenhg5 pushed a commit that referenced this issue Mar 12, 2020
chenhg5 pushed a commit that referenced this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants