Question: run these python code with defrent random masege ( import hashlib import random def find _ collision ( ) : hashes = { } while
run these python code with defrent random masege import hashlib
import random
def findcollision:
hashes
while True:
message joinchrrandomrandint for in range
shahash hashlib.shamessageencodehexdigest
firstbits shahash: # Extract the first bits nibbles
if firstbits in hashes:
return message, hashesfirstbits
else:
hashesfirstbits message
message message findcollision
printCollision found:"
printMessage : message
printMessage : messageand shwe the output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
