Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
imaplib._Authenticator Class Reference

List of all members.

Public Member Functions

def __init__
def process
def encode
def decode

Public Attributes

 mech

Detailed Description

Private class to provide en/decoding
        for base64-based authentication conversation.

Definition at line 1267 of file imaplib.py.


Constructor & Destructor Documentation

def imaplib._Authenticator.__init__ (   self,
  mechinst 
)

Definition at line 1273 of file imaplib.py.

01273 
01274     def __init__(self, mechinst):
01275         self.mech = mechinst    # Callable object to provide/process data

Here is the caller graph for this function:


Member Function Documentation

def imaplib._Authenticator.decode (   self,
  inp 
)

Definition at line 1304 of file imaplib.py.

01304 
01305     def decode(self, inp):
01306         if not inp:
01307             return ''
01308         return binascii.a2b_base64(inp)
01309 
01310 

Here is the caller graph for this function:

def imaplib._Authenticator.encode (   self,
  inp 
)

Definition at line 1282 of file imaplib.py.

01282 
01283     def encode(self, inp):
01284         #
01285         #  Invoke binascii.b2a_base64 iteratively with
01286         #  short even length buffers, strip the trailing
01287         #  line feed from the result and append.  "Even"
01288         #  means a number that factors to both 6 and 8,
01289         #  so when it gets to the end of the 8-bit input
01290         #  there's no partial 6-bit output.
01291         #
01292         oup = ''
01293         while inp:
01294             if len(inp) > 48:
01295                 t = inp[:48]
01296                 inp = inp[48:]
01297             else:
01298                 t = inp
01299                 inp = ''
01300             e = binascii.b2a_base64(t)
01301             if e:
01302                 oup = oup + e[:-1]
01303         return oup

Here is the caller graph for this function:

def imaplib._Authenticator.process (   self,
  data 
)

Definition at line 1276 of file imaplib.py.

01276 
01277     def process(self, data):
01278         ret = self.mech(self.decode(data))
01279         if ret is None:
01280             return '*'      # Abort conversation
01281         return self.encode(ret)


Member Data Documentation

Definition at line 1274 of file imaplib.py.


The documentation for this class was generated from the following file: