Table of Contents

Module: otp | Twisted-0.17.4/twisted/python/otp.py
--- | ---

A One-Time Password System based on RFC 2289

The class Authenticator contains the hashing-logic, and the parser for the readable output. It also contains challenge which returns a string describing the authentication scheme for a client.

OTP is a password container for an user on a server.

NOTE: Does not take care of transmitting the shared secret password.

At the end there's a dict called dict which is dictionary contain 2048 words for storing pronouncable 11-bit values. Taken from RFC 1760.

Uses the MD5- and SHA-algorithms for hashing

Todo: RFC2444, SASL (perhaps), parsing hex-responses

Imported modules |
--- | ---
import md5 import random import sha import string
Functions |
longToString stringToDWords stringToLong
| longToString

    longToString ( l )

Convert long to digest

| stringToDWords

    stringToDWords ( s )

Convert digest to a list of four 32-bits words

| stringToLong

    stringToLong ( s )

Convert digest to long

Classes |

OTP | An automatic version of the OTP-Authenticator
OTPAuthenticator | A One Time Password System
Unauthorized | the Unauthorized exception

Table of Contents

This document was automatically generated on Sat Apr 20 01:31:23 2002 by HappyDoc version 2.0