I have written some hash code and it supposed to have a 32 bits output. But i don't know how to make it 32 bit as the output. please help me with this. Here is my code:
Code:
import BitVector
import io
import math
import struct
if __name__ == "__main__":
message = raw_input("your message:")
f= open('file.dat','w')
f.write(message)
f.close()
In the first part that i wrote there is some error. It get the input from the user and convert it to binary. It works but at the end it gives me an error regarding the value for the base 16. I copying my code here, please tell me where the error is coming from.
thanks.
Hi guys. I'm new to cryptography. I'm practicing different hash algorithm. IS there any one who can tell me how to write a simple hash function that creates a 32-bit hash of a file?
Thanks.
Leave a comment: