Python Forum
how can I generate a password in hashlib - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: how can I generate a password in hashlib (/thread-18119.html)

Pages: 1 2 3


RE: how can I generate a password in hashlib - buran - May-19-2019

(May-19-2019, 09:01 AM)go127a Wrote: it works, I wonder that you wrote it in 16 lines!!
That is because you don't listen. I have outlined several times what you have to do...

(May-19-2019, 09:01 AM)go127a Wrote: for the third line in input, the code will return '0' which is incorrect.
second and third are exactly the same hash. my code returns correct output
Output:
danial,5104 elham,9770 stefi,9770
(May-19-2019, 09:01 AM)go127a Wrote: also I should use (OrderedDict from collections library) to make a dictionary and solve it with dictionary.
if this is homework with specific requirments it should be in Homework section and you should post the assignment and restrictions verbatim.
you can replace the normal dict with OrderedDict though it is not necessary for this problen and also in 3.7+ it really doesn't matter.