Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/MySQL/MySQL Workbench 6.1 CE/python/site-packages/Crypto/Util/ |
Upload File : |
ó ¤'Sc @ sÒ d d l m Z m Z d d l Z d d l Td d d d d d g Z d d d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z d S( iÿÿÿÿ( t long_to_bytest bytes_to_longN( t *t DerObjectt DerIntegert DerOctetStringt DerNullt DerSequencet DerObjectIdc B sƒ e Z d Z i d d 6d d 6d d 6d d 6d d 6d d 6Z d e d ƒ d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z RS( s Base class for defining a single DER object. Instantiate this class ONLY when you have to decode a DER element. i0 t SEQUENCEi s BIT STRINGi t INTEGERi s OCTET STRINGi t NULLi s OBJECT IDENTIFIERt c C sj t | ƒ s | d k r$ | | _ n9 t | ƒ d k rH t | ƒ | _ n | j j | ƒ | _ | | _ d S( sð 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).i N( t isIntt Nonet typeTagt lent ordt typeTagst gett payload( t selft ASN1TypeR ( ( s\ C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\Crypto\Util\asn1.pyt __init__' s c C s | j | | j k S( N( R R ( R R ( ( s\ C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\Crypto\Util\asn1.pyt isType6 s c C s: | d k r0 t | ƒ } t t | ƒ d ƒ | St | ƒ S( s• Return a byte string that encodes the given payload length (in bytes) in a format suitable for a DER length tag (L). i i€ ( R t bchrR ( R t payloadLent encoding( ( s\ C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\Crypto\Util\asn1.pyt _lengthOctets9 s c C s* t | j ƒ | j t | j ƒ ƒ | j S( s6 Return a complete DER element, fully encoded as a TLV.( R R R R R ( R ( ( s\ C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\Crypto\Util\asn1.pyt encodeB s c C s~ t | | ƒ } | d k r* | | d f St | | d | d | d @!ƒ } | d k rh t d ƒ ‚ n | | d | d @f S( s… Given a (part of a) DER element, and an index to the first byte of a DER length tag (L), return a tuple with the payload size, and the index of the first byte of the such payload (V). Raises a ValueError exception if the DER length is invalid. Raises an IndexError exception if the DER element is too short. i i s Not a DER length tag.( t bordR t ValueError( R t idxt dert lengtht payloadLength( ( s\ C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\Crypto\Util\asn1.pyt _decodeLenF s #i c C s¸ y t | d ƒ | _ | j d @d k r8 t d ƒ ‚ n | j d | ƒ \ } } | r{ t | ƒ | | k r{ t d ƒ ‚ n | | | | !| _ Wn t k r¯ t d ƒ ‚ n X| | S( sÎ 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. i i s Unsupported DER tagi s Not a DER structures Not a valid DER SEQUENCE.( R R R R$ R R t IndexError( R t derElet noLeftOversR"