관리-도구
편집 파일: dsbase.pyc
� !`Nc @ sD d d l Z d d l Z d d l Z d e j j f d � � YZ d S( i����Nt DSBasec B s� e Z d Z d d d d g Z d � Z d e d � Z d e d � Z e e � Z d d d � Z d d � Z e e � Z d � Z RS( sJ Base class for rdata that is like a DS record @ivar key_tag: the key tag @type key_tag: int @ivar algorithm: the algorithm @type algorithm: int @ivar digest_type: the digest type @type digest_type: int @ivar digest: the digest @type digest: int @see: draft-ietf-dnsext-delegation-signer-14.txtt key_tagt algorithmt digest_typet digestc C sA t t | � j | | � | | _ | | _ | | _ | | _ d S( N( t superR t __init__R R R R ( t selft rdclasst rdtypeR R R R ( ( s8 /usr/lib64/python2.7/site-packages/dns/rdtypes/dsbase.pyR $ s c K s2 d | j | j | j t j j | j d d �f S( Ns %d %d %d %st chunksizei� ( R R R t dnst rdatat _hexifyR ( R t origint relativizet kw( ( s8 /usr/lib64/python2.7/site-packages/dns/rdtypes/dsbase.pyt to_text, s c C s� | j � } | j � } | j � } g } xQ | j � j � } | j � rO Pn | j � sj t j j � n | j | j � q- Wd j | � } | j d � } | | | | | | | � S( Nt t hex_codec( t get_uint16t get_uint8t gett unescapet is_eol_or_eoft is_identifierR t exceptiont SyntaxErrort appendt valuet joint decode( t clsR R t tokR R R R R t chunkst tR ( ( s8 /usr/lib64/python2.7/site-packages/dns/rdtypes/dsbase.pyt from_text2 s c C sB t j d | j | j | j � } | j | � | j | j � d S( Ns !HBB( t structt packR R R t writeR ( R t filet compressR t header( ( s8 /usr/lib64/python2.7/site-packages/dns/rdtypes/dsbase.pyt to_wireE s c C sm t j d | | | d !� } | d 7} | d 8} | | | | !j � } | | | | d | d | d | � S( Ns !HBBi i i i ( R% t unpackt unwrap( R R R t wiret currentt rdlenR R* R ( ( s8 /usr/lib64/python2.7/site-packages/dns/rdtypes/dsbase.pyt from_wireK s c C sy t j d | j | j | j � } t j d | j | j | j � } t | | � } | d k ru t | j | j � } n | S( Ns !HBBi ( R% R&