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

when generating salt, return error if any instead of just logging it #2

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

conradoplg
Copy link
Contributor

Ignoring errors when generating the salt is bad; presently if any errors occurs it will use an empty salt.

I decided not to create a specific error for it because it would mask the original error, and it doesn't seem to be an error that the client could check for and do something about it.

I've also changed the salt generation to the slightly more idiomatic rand.Read.

@dwin dwin merged commit 802f4a2 into dwin:master Feb 20, 2019
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

Successfully merging this pull request may close these issues.

2 participants