Created
April 5, 2015 19:10
-
-
Save volpino/02b0dc346ebebef3e1f1 to your computer and use it in GitHub Desktop.
NDH Quals 2015 weshgrow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def round(byte): | |
c = 162888806 | |
for i in range(3, 0, -1): | |
state[i] = (state[0] * state[i] + state[0] * byte) % 4294967295 | |
self.state[0] = (state[0] * c + state[1] * byte) % 4294967295 | |
def hash(data): | |
for char in data: | |
round(ord(char)) | |
return "".join([to_hex(x) for x in state]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment