-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue#207 app#get hash #211
Conversation
@@ -55,7 +56,9 @@ def get_hash(password, salt): | |||
m = hashlib.sha512() | |||
m.update(salt.encode('utf8')) | |||
m.update(password.encode('utf8')) | |||
return m.digest() | |||
hex = m.hexdigest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
la db a un champ binaire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je retransforme en binaire le digest. J'ai marqué la raison dans le description de la PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non tes gens sur stack overflow veulent le hex.. Là tu prend du hex et tu
remet en bin.
Ton test devrait prendre un hex hardcodé et le mettre en bin. Ça a pas
rapport le hex dans le code de prod.
Le 11 oct. 2015 11:36 AM, "Félix Leblanc" [email protected] a
écrit :
In app.py
#211 (comment)
:@@ -55,7 +56,9 @@ def get_hash(password, salt):
m = hashlib.sha512()
m.update(salt.encode('utf8'))
m.update(password.encode('utf8'))
- return m.digest()
- hex = m.hexdigest()
Je retransforme en binaire le digest. J'ai marqué la raison dans le
description de la PR.—
Reply to this email directly or view it on GitHub
https://github.com/lanmomo/lanmomo-website/pull/211/files#r41711917.
7cc60c6
to
2846de8
Compare
? |
fix #207
Changements
Il est préférable d'utiliser la méthode hexdigest au lieu de digest.
https://stackoverflow.com/questions/2436621/python-decoding-issue-with-hashlib-digest-method
https://stackoverflow.com/questions/18174332/output-of-hashlib-sha512-digest-has-odd-characters