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

salting is good #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

salting is good #6

wants to merge 1 commit into from

Conversation

jozsarato
Copy link

hopefully

Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks for your contribution! 🚀

i left some comments that should be addressed before merging this PR.

def salt():
chars=list(string.ascii_lowercase)
random.shuffle(chars)
return chars[0:5]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could join here, so you can get a nice string from this function to avoid having to do it outside



def authenticate(username, password, pwdb):
if username in pwdb:
if password == pwdb[username]:

if pwhash("".join(pwdb[username][0])+password) == pwdb[username][1]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it correct/necessary to use join here for the extracted salt?

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