ó õùPc@sŽdZdddddgZddlZejdd krZejd d krZdd lTnd „Zd „Zd„Zd„Ze d„Z dS(s$Id$t ceil_shifttceil_divt floor_divt exact_log2t exact_diviÿÿÿÿNiii(t*cCs¥t|ttfƒ s,t|ttfƒ rWtdt|ƒjt|ƒjfƒ‚n|dkro|dksut‚d|>d}||@r™||?dS||?SdS(sÏReturn ceil(n / 2**b) without performing any floating-point or division operations. This is done by right-shifting n by b bits and incrementing the result by 1 if any '1' bits were shifted out. s&unsupported operand type(s): %r and %riliN(t isinstancetinttlongt TypeErrorttypet__name__tAssertionError(tntbtmask((s2..\python\site-packages\Crypto\Util\_number_new.pyR"s,+  cCs‚t|ttfƒ s,t|ttfƒ rWtdt|ƒjt|ƒjfƒ‚nt||ƒ\}}|rz|dS|SdS(sDReturn ceil(a / b) without performing any floating-point operations.s&unsupported operand type(s): %r and %riN(RRRR R R tdivmod(taRtqtr((s2..\python\site-packages\Crypto\Util\_number_new.pyR2s ,+cCspt|ttfƒ s,t|ttfƒ rWtdt|ƒjt|ƒjfƒ‚nt||ƒ\}}|S(Ns&unsupported operand type(s): %r and %r(RRRR R R R(RRRR((s2..\python\site-packages\Crypto\Util\_number_new.pyR>s,+cCsÑt|ttfƒs4tdt|ƒjfƒ‚nt|ƒ}|dkr[tdƒ‚nd}xI|dkr¬|d@r•|dkr•tdƒ‚n|d7}|dL}qdW|d8}|d|>ksÍt‚|S(s~Find and return an integer i >= 0 such that num == 2**i. If no such integer exists, this function raises ValueError. sunsupported operand type: %ris/cannot compute logarithm of non-positive numberisNo solution could be foundl(RRRR R R t ValueErrorR (tnumR ti((s2..\python\site-packages\Crypto\Util\_number_new.pyREs    cCsÛt|ttfƒ s,t|ttfƒ rWtdt|ƒjt|ƒjfƒ‚n|dkr‘|r‘d}|||krÁtdƒ‚qÁn0t||ƒ\}}|dkrÁtdƒ‚n|||ks×t‚|S(sFind and return an integer n such that p == n * d If no such integer exists, this function raises ValueError. Both operands must be integers. If the second operand is zero, this function will raise ZeroDivisionError unless allow_divzero is true (default: False). s&unsupported operand type(s): %r and %risNo solution could be found( RRRR R R RRR (tptdt allow_divzeroR R((s2..\python\site-packages\Crypto\Util\_number_new.pyR]s ,+ ( t __revision__t__all__tsyst version_infotCrypto.Util.py21compatRRRRtFalseR(((s2..\python\site-packages\Crypto\Util\_number_new.pyts &