I have been trying to write a small python script for the sha1 algorithm. I needed to initialize the global variables of h0 to h4.
After initalize the value of the integers, it changes to a different int for h0 and h3 values, and not h1, h2 or h4. I'm not sure why, as a quick google search shows that h0 and h3 are not special characters.
Relevant code:
h0 = 0
h1 = 0
h2 = 0
h3 = 0
h4 = 0
#Initialize some variables
def init_var():
global h0
global h1
global h2
global h3
global h4
h0 = 01100111010001010010001100000001
h1 = 11101111110011011010101110001001
h2 = 10011000101110101101110011111110
h3 = 00010000001100100101010001110110
h4 = 11000011110100101110000111110000
print "\n\n\n h0", h0
print "h1", h1
print "h2", h2
print "h3", h3
print "h4", h4
When I print it in the console, it gives:
robert@robert-VirtualBox:~/sha1-hash-algorithm$ python testalgorithm.py
h0 1393027350754575011593322497
h1 11101111110011011010101110001001
h2 10011000101110101101110011111110
h3 19342823492383875910635592
h4 11000011110100101110000111110000
Can someone tell me why is this happening? Is this some special character in python?
