Package dpkt :: Module asn1
[hide private]
[frames] | no frames]

Module asn1

source code

Abstract Syntax Notation #1.

Functions [hide private]
 
utctime(buf)
Convert ASN.1 UTCTime string to UTC float.
source code
 
decode(buf)
Sleazy ASN.1 decoder.
source code
 
test_asn1() source code
Variables [hide private]
  CLASSMASK = 192
  UNIVERSAL = 0
  APPLICATION = 64
  CONTEXT = 128
  PRIVATE = 192
  CONSTRUCTED = 32
  TAGMASK = 31
  INTEGER = 2
  BIT_STRING = 3
  OCTET_STRING = 4
  NULL = 5
  OID = 6
  SEQUENCE = 16
  SET = 17
  PRINT_STRING = 19
  T61_STRING = 20
  IA5_STRING = 22
  UTC_TIME = 23
  __package__ = 'dpkt'
Function Details [hide private]

utctime(buf)

source code 
Convert ASN.1 UTCTime string to UTC float.

TODO: Long description here.

Args:
    buf: A buffer with format "yymnddhhmm"

Returns:
    A floating point number, indicates seconds since the Epoch.

decode(buf)

source code 
Sleazy ASN.1 decoder.

TODO: Long description here.

Args:
    buf: A buffer with Sleazy ASN.1 data.

Returns:
    A list of (id, value) tuples from ASN.1 BER/DER encoded buffer.

Raises:
    UnpackError: An error occurred the ASN.1 length exceed.