| | |
How to use MD5 in Python?
Thread Solved |
0
#2 Nov 12th, 2009
Sooo. What work have you done? Its nice to see a base from which we can help you.
Make it idiot-proof, and someone will just make a better idiot
Check out my Site | and join us on IRC | Python Specific IRC
Check out my Site | and join us on IRC | Python Specific IRC
0
#3 Nov 12th, 2009
Generally module md5 is used to encrypt strings/texts like passwords by making a unique check sum of the string. Once encrypted you cannot decrypt the resulting check sum back to the original string. The only way you can find out its contents is to encrypt another string and compare the md5 check sums.
Here is an example ...
You can save the text to a file and attach the hexdigest string as a final line.
Here is an example ...
Python Syntax (Toggle Plain Text)
# Note that Python30 dropped md5 and uses hashlib.md5() import md5 mystring = "meet me at Karl's bar on Friday the tenth at 9PM" print( md5.md5(mystring).hexdigest() )
Last edited by vegaseat; Nov 17th, 2009 at 12:18 pm. Reason: ref to check sums
May 'the Google' be with you!
•
•
Join Date: Nov 2007
Posts: 148
Reputation:
Solved Threads: 33
0
#4 Nov 12th, 2009
You're probably going to want to use some recursion when you're searching through the directories. If you copy subfolders you're going to want to know if the files in the subfolders have also copied properly.
You can see some examples of using recursion to list all the files in a directory and its subdirectories in this thread: http://www.daniweb.com/forums/thread234497.html
You can see some examples of using recursion to list all the files in a directory and its subdirectories in this thread: http://www.daniweb.com/forums/thread234497.html
![]() |
Similar Threads
- Starting Python (Python)
- MD5 hashing (Java)
- Making text a clickable link in Python (Python)
- A python script with input (Python)
- MD5 hash for url (Python)
- md5 Brute Forcing (Python)
- python code security or set up a complied python code with a password (Python)
- Code Snippet: Mortgage Calculator (Python) (Python)
Other Threads in the Python Forum
- Previous Thread: Rewriting output on the same line?
- Next Thread: Generating random nos without using random module
Views: 623 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Python
activex anydbm application array beginner c++ c/c++ casino change character class client code command convert count create ctypes database def dictionary django dll error errors examples excel exe extensions fdlib file float format framework ftp function graphics gui homework image images import input library line linux list lists logging loop loops microcontroller mouse mysql mysqldb number numbers output parsing path port prime processing program programming py2exe pygame pygtk pyqt pysimplewizard python recursion recursive redirect remote reverse right-click scrolledtext server socket ssh stdout string strings table terminal text thread threading tkinter transparency tuple tutorial ubuntu unicode variable variables web windows wxpython






