Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- inp = raw_input()
- n = len( inp )
- # k = n - 3
- k = n
- pol = 0xEDB88320
- n = (n - k)
- c = raw_input()
- c2 = raw_input()
- c = c ^ c2
- p2 = (pol << 1) | 1
- while ( n < 3 ):
- if (c & 0x80000000):
- c = (c << 1) ^ p2
- else :
- c <<= 1
- n += 1
- print ("XOR masks:%02X%02X%02X%02X\n", c & 0xff, (c >> 8) & 0xff,(c >> 16) & 0xff, c >> 24)
- return 0
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment