I am trying to make a program where you encrypt a piece of data and then subtract the last 16 characters from the output.
import hashlib
# initializing string
str2hash = "test" #input
# encoding GeeksforGeeks using encode()
# then sending to md5()
result = hashlib.md5(str2hash.encode())
# printing the equivalent hexadecimal value.
print("The hexadecimal equivalent of hash is : ", end="")
print(result.hexdigest())
some stuff that I've tried are
print(result.hexdigest()) -16
str2hash = "test" -16
I'm pretty new to coding in python so any help I can get from this will help.