As a bit of fun I implemented the Secure Hash Algorithm (SHA) 1 late last night. It was done using Python3 and accordingly to FIPS 180-1.
Below is shown how to use it:
>>> import sha1
>>> data = sha1.str2bin("All your base are belong to us!")
>>> sha1.digest(data)
'1110101011101101100000101101000101010000110001110110110010000011
1101011101110100101001110011011101001110011110001100111000000111
11010001110010001100100010100110'
>>> sha1.hex_digest(data)




![[FSF Associate Member]](/gfx/emblems/fsfmem.png)