How to get the MD5 sum of a string using Python
If you need to get the MD5 sum of a string using Python, then you can do the following.
Step 1 Firstly, we need to use the hashlib module:
1 import hashlib Step 2 Now make sure that the input string is encoded correctly.
1 your_input = "this is your input string".encode('utf-8') Step 3 Finally use the md5 function of the hashlib module, and get the hexdigest() value from it: