t.p.o.OTP(OTPAuthenticator) : class documentation

Part of twisted.python.otp View Source View In Hierarchy

An automatic version of the OTP-Authenticator

Updates the sequence and the keeps last approved password on success On the next authentication, the stored password is hashed and checked up against the one given by the user. If they match, the sequencecounter is decreased and the circle is closed.

This object should be glued to each user

Note: It does NOT reset the sequence when the combinations left approach zero, This has to be done manuelly by instancing a new object
Method __init__ Initialize the OTP-Sequence, and discard the password
Method challenge Return a challenge string
Method authenticate Test the phrase against the last challenge issued

Inherited from OTPAuthenticator:

Method generateSeed Return a 10 char random seed, with 6 lowercase chars and 4 digits
Method foldDigest Undocumented
Method foldDigest128 Fold a 128 bit digest to 64 bit
Method foldDigest160 Fold a 160 bit digest to 64 bit
Method hashUpdate Run through the hash and fold to 64 bit
Method generateOTP Return a 64 bit OTP based on inputs Run through makeReadable to get a 6 word pass-phrase
Method calculateParity Calculate the parity from a 64bit OTP
Method makeReadable Returns a 6 word pass-phrase from a 64bit OTP
Method parsePhrase Decode the phrase, and return a 64bit OTP I will raise Unauthorized if the parity is wrong TODO: Add support for hex (MUST) and the '2nd scheme'(SHOULD)
def __init__(self, passwd, sequence=INITIALSEQUENCE, hash=md5): (source)
Initialize the OTP-Sequence, and discard the password
def challenge(self): (source)
Return a challenge string
def authenticate(self, phrase): (source)
Test the phrase against the last challenge issued
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:27:37.