October 2016
Beginner to intermediate
650 pages
14h 43m
English
SHA hashes are also extremely commonly used, alongside MD5 hashes. The early implementation of SHA hashes started with SHA1, which is less frequently used now due to the weakness of the hash. SHA1 was followed up with SHA128, which was then replaced by SHA256.
Once again for these scripts, we will only be requiring the hashlib module.
Generating SHA hashes within Python is also extremely simple by using the imported module. With simple tweaks, we can change whether we would like to generate an SHA1, SHA128, or SHA256 hash.
The following are three different scripts that allow us to generate the different SHA hashes:
Here is the script of SHA1:
import hashlib message = raw_input("Enter the string ...Read now
Unlock full access