To write a program to implement the MD5 hashing technique.
STEP-1: Read the 128-bit plain text.
STEP-2: Divide into four blocks of 32-bits named as A, B, C and D.
STEP-3: Compute the functions f, g, h and i with operations such as, rotations, permutations, etc,.
STEP-4: The output of these functions are combined together as F and performed circular shifting and then given to key round.
STEP-5: Finally, right shift of โsโ times are performed and the results are combined together to produce the final output.
#Code to demonstrate the MD5
import hashlib
# function
result = hashlib.md5(b'GeeksforGeeks')
# printing the equivalent byte value.
print("The byte equivalent of hash is : ", end ="")
print(result.digest())
Thus the implementation of MD5 hashing algorithm had been implemented successfully using C.