Package Crypto :: Package Util :: Module asn1 :: Class DerOctetString
[hide private]
[frames] | no frames]

Class DerOctetString

DerObject --+
            |
           DerOctetString

Instance Methods [hide private]
 
__init__(self, value='')
Initialize the DER object according to a specific type.
 
decode(self, derEle, noLeftOvers=0)
Decode a complete DER element, and re-initializes this object with it.

Inherited from DerObject: encode, isType

Inherited from DerObject (private): _decodeLen, _lengthOctets

Class Variables [hide private]

Inherited from DerObject: typeTags

Method Details [hide private]

__init__(self, value='')
(Constructor)

 

Initialize the DER object according to a specific type.

The ASN.1 type is either specified as the ASN.1 string (e.g. 'SEQUENCE'), directly with its numerical tag or with no tag at all (None).

Overrides: DerObject.__init__
(inherited documentation)

decode(self, derEle, noLeftOvers=0)

 

Decode a complete DER element, and re-initializes this object with it.

@param derEle A complete DER element. It must start with a DER T

tag.

@param noLeftOvers Indicate whether it is acceptable to complete the

parsing of the DER element and find that not all bytes in derEle have been used.

@return Index of the first unused byte in the given DER element.

Raises a ValueError exception in case of parsing errors. Raises an IndexError exception if the DER element is too short.

Overrides: DerObject.decode
(inherited documentation)