Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use the Python code given to calculate the SHA 2 5 6 of a text of your choice. import hashlib BUF _ SIZE = 3
Use the Python code given to calculate the SHA of a text of your choice.
import hashlib
BUFSIZE # Read file in kb
hashobject hashlib.sha
with openrb as f:
while True:
data freadBUFSIZE
hashobject.updatedata
if not data:
break
hexdig hashobject.hexdigest
Extend the code to calculate the hash of a file you may use it on the excel files you created in the previous practical sessions and store the hash in a text file hashtxt
Make small changes to the file and calculate the hash again. Add the new hash to hashtxt and compare them. What do you notice?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started