Package ldaptor :: Package protocols :: Module pureber
[hide private]
[frames] | no frames]

Module pureber

source code

Pure, simple, BER encoding and decoding

Classes [hide private]
  UnknownBERTag
  BERBase
  BERStructured
  BERException
  BERExceptionInsufficientData
  BERInteger
  BEROctetString
  BERNull
  BERBoolean
  BEREnumerated
  BERSequence
  BERSequenceOf
  BERSet
  BERDecoderContext
Functions [hide private]
 
berDecodeLength(m, offset=0)
Return a tuple of (length, lengthLength).
source code
 
int2berlen(i) source code
 
int2ber(i, signed=True) source code
 
ber2int(e, signed=True) source code
 
need(buf, n) source code
 
berDecodeObject(context, string)
berobject may be None.
source code
 
berDecodeMultiple(content, berdecoder)
Decodes everything in content and returns a list of decoded objects.
source code
Variables [hide private]
  CLASS_MASK = 192
  CLASS_UNIVERSAL = 0
  CLASS_APPLICATION = 64
  CLASS_CONTEXT = 128
  CLASS_PRIVATE = 192
  STRUCTURED_MASK = 32
  STRUCTURED = 32
  NOT_STRUCTURED = 0
  TAG_MASK = 31
Function Details [hide private]

berDecodeLength(m, offset=0)

source code 
Return a tuple of (length, lengthLength). m must be atleast one byte long.

berDecodeObject(context, string)

source code 
berobject may be None.
Returns:
(berobject, bytesUsed)

berDecodeMultiple(content, berdecoder)

source code 

Decodes everything in content and returns a list of decoded objects.

All of content will be decoded, and content must contain complete BER objects.
Returns:
[objects]