Viewing File: /usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyc

ó
-=Pc@s¤ddlZddlZddlZddlZddlZddlZddlZejddƒZ	ejddƒZ
dZdZdej
jfd„ƒYZdS(iÿÿÿÿNt 0123456789ABCDEFGHIJKLMNOPQRSTUVt ABCDEFGHIJKLMNOPQRSTUVWXYZ234567itNSEC3cBs‰eZdZddddddgZd„Zd
ed„Zd
ed	„Ze	eƒZd
d
d
„Z
d
d„Ze	eƒZd„ZRS(sžNSEC3 record

    @ivar algorithm: the hash algorithm number
    @type algorithm: int
    @ivar flags: the flags
    @type flags: int
    @ivar iterations: the number of iterations
    @type iterations: int
    @ivar salt: the salt
    @type salt: string
    @ivar next: the next name hash
    @type next: string
    @ivar windows: the windowed bitmap list
    @type windows: list of (window number, string) tuplest	algorithmtflagst
iterationstsalttnexttwindowsc		CsStt|ƒj||ƒ||_||_||_||_||_||_dS(N(	tsuperRt__init__RRRRRR(	tselftrdclasstrdtypeRRRRRR((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyR
6s					c
Ks/tj|jƒjtƒjƒ}|jdkr9d}n|jjdƒ}d}x¸|jD]­\}}g}	xt	dt
|ƒƒD]j}
t||
ƒ}xQt	ddƒD]@}|d|?@r©|	jt
jj|d|
d|ƒƒq©q©WqƒW|ddj|	ƒ7}q[Wd	|j|j|j|||fS(
Ntt-s	hex-codeciii€it s%u %u %u %s %s%s(tbase64t	b32encodeRt	translatetb32_normal_to_hextlowerRtencodeRtxrangetlentordtappendtdnst	rdatatypetto_texttjoinRRR(
Rtorigint
relativizetkwRRttexttwindowtbitmaptbitstitbytetj((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyR@s !	%c	Csa|jƒ}|jƒ}|jƒ}|jƒ}	|	dkrEd}	n|	jdƒ}	|jƒjƒjtƒ}
tj|
ƒ}
g}x‰|j	ƒj
ƒ}|jƒr©Pntj
j|jƒ}
|
dkrßtjjdƒ‚n|
dkrtjjdƒ‚n|j|
ƒq‡|jƒd}d}d}dgd	}g}xÎ|D]Æ}
|
|kr^qFn|
}|
d
}||krÂ|dkr¬|j|dj|d|!ƒfƒndgd	}|}n|
d
}|d}|d}|d}tt||ƒd
|?Bƒ||<qFW|dkrB|j|dj|d|!ƒfƒn|||||||	|
|ƒS(NRRs	hex-codecisNSEC3 with bit 0iÿÿsNSEC3 with bit > 65535ti iiii€(t	get_uint8t
get_uint16t
get_stringtdecodetupperRtb32_hex_to_normalRt	b32decodetgettunescapet
is_eol_or_eofRRt	from_texttvaluet	exceptiontSyntaxErrorRtsortRtchrR(tclsRR
ttokRR RRRRRtrdtypesttokentnrdtypeR#toctetstprior_rdtypeR$Rt
new_windowtoffsetR'tbit((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyR4SsX	



&
	



&&cCsÙt|jƒ}|jtjd|j|j|j|ƒƒ|j|jƒt|jƒ}|jtjd|ƒƒ|j|jƒxP|j	D]E\}}|jt
|ƒƒ|jt
t|ƒƒƒ|j|ƒqŒWdS(Ns!BBHBs!B(RRtwritetstructtpackRRRRRR9(RtfiletcompressRtlR#R$((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pytto_wire„sc	CsÝtjd|||d!ƒ\}}}	}
|d7}|d8}||||
!jƒ}||
7}||
8}tjd||ƒ\}|d7}|d8}||||!jƒ}
||7}||8}g}xõ|dkr½|dkrötjjdƒ‚nt||ƒ}t||dƒ}|dks2|dkrGtjjd	ƒ‚n|d
7}|d
8}||kr|tjjdƒ‚n||||!jƒ}||7}||8}|j||fƒqÉW||||||	||
|ƒS(Ns!BBHBis!BiiisNSEC3 too shorti sbad NSEC3 octetsisbad NSEC3 bitmap length(REtunpacktunwrapRR6t	FormErrorRR(R:RR
twiretcurrenttrdlenRRRRtslenRtnlenRRR#R?R$((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyt	from_wire‘s<	 











cCsKtjƒ}|j|ƒtjƒ}|j|ƒt|jƒ|jƒƒS(N(t	cStringIOtStringIORJtcmptgetvalue(Rtothertb1tb2((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyt_cmp³s


N(
t__name__t
__module__t__doc__t	__slots__R
tNonetTrueRR4tclassmethodRJRSR[(((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyR$s	
/
 (RRTtstringREt
dns.exceptionRt	dns.rdatat
dns.rdatatypet	maketransR/RtSHA1tOPTOUTtrdatatRdataR(((s;/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyt<module>s				
Back to Directory File Manager