7
class Unauthorized(Exception):
8
"""An exception that is raised when unauthorized actions are attempted.
12
def respond(challenge, password):
13
"""Respond to a challenge.
14
This is useful for challenge/response authentication.
18
hashedPassword = m.digest()
20
m.update(hashedPassword)
22
doubleHashedPassword = m.digest()
23
return doubleHashedPassword
26
"""I return some random data.
29
for x in range(random.randrange(15,25)):
30
crap = crap + chr(random.randint(65,90))
31
crap = md5.new(crap).digest()