Skip to content

Commit

Permalink
Removed unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Færevaag committed Jun 23, 2013
1 parent 1207f84 commit c719e4c
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions project2/RainbowAttack.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,14 @@

BIT_SIZE = 28
CHAIN_LEN = 2**10
TABLE_NAME = "table.csv"
TABLE_NAME = "rainbowproject2_long.csv"
SERIAL_NO = 0123456

#s = random.getrandbits(BIT_SIZE)
s = int('0xcf496ab', 16)
s = random.getrandbits(BIT_SIZE)
#s = int('0xcf496ab', 16)
u = int("0xdaffeda", 16)


def cstring(msg, color):
c = ''
if color.lower() is 'red':
c = '033[91m'
elif color.lower() is 'yellow':
c = '033[93m'
elif color.lower() is 'green':
c = '033[92m'

return "%s %s %s" % (c, msg, c)


#def f(s):
# """Lowest 28 bits of MD5(s||u)"""
# digest = md5.new(str(s) + str(u)).hexdigest()[:BIT_SIZE/4]
# return int(digest, 16)


def f(s, i=0):
"""Lowest 28 bits of (MD5(s||u) % i)"""
digest = md5.new(str(s) + str(u)).hexdigest()[:BIT_SIZE/4]
Expand Down

0 comments on commit c719e4c

Please sign in to comment.