parameters: (self, user, secret)
return_statement: return self._shortcmd('APOP %s %s' % (user, digest))
docstring: Authorisation
  
          - only possible if server has supplied a timestamp in initial greeting.
  
          Args:
                  user    - mailbox user;
                  secret  - secret shared between client and server.
  
          NB: mailbox is locked by server from here to 'quit()'
docstring_summary: Authorisation
docstring_tokens: Authorisation
function: def apop(self, user, secret):
          """Authorisation
  
          - only possible if server has supplied a timestamp in initial greeting.
  
          Args:
                  user    - mailbox user;
                  secret  - secret shared between client and server.
  
          NB: mailbox is locked by server from here to 'quit()'
          """
          m = self.timestamp.match(self.welcome)
          if not m:
              raise error_proto('-ERR APOP not supported by server')
          import hashlib
          digest = hashlib.md5(m.group(1)+secret).digest()
          digest = ''.join(map(lambda x:'%02x'%ord(x), digest))
          return self._shortcmd('APOP %s %s' % (user, digest))
function_tokens: def apop ( self , user , secret ) : m = self . timestamp . match ( self . welcome ) if not m : raise error_proto ( '-ERR APOP not supported by server' ) import hashlib digest = hashlib . md5 ( m . group ( 1 ) + secret ) . digest ( ) digest = '' . join ( map ( lambda x : '%02x' % ord ( x ) , digest ) ) return self . _shortcmd ( 'APOP %s %s' % ( user , digest ) )