%PDF- %PDF-
Direktori : /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/ |
Current File : //opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyo |
� �ac @ s� d Z d d l Z e j d d k rE e j d d k rE d d l Tn d d l Td d l Z d e j f d � � YZ i d � Z e d k r� d � Z e j d d � n d S( s $Id$i����Ni i i ( t *t CounterTestsc B s} e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( c C s d d l m a d S( Ni����( t Counter( t Crypto.UtilR ( t self( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt setUp% s c C s� t j d � } | j | j t � t j d d t �} | j | j t � t j d d t �} | j | j t � t j d d t d t �} | j | j t � d S( Ni� t little_endiant disable_shortcut( R t newt assertEqualt __PCT_CTR_SHORTCUT__t Truet False( R t c( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_BE_shortcut) s c C sZ t j d d t �} | j | j t � t j d d t d t �} | j | j t � d S( Ni� R R ( R R R R R R ( R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_LE_shortcut4 s c C s` t j d d t �} | j t t | d � t j d d t d t �} | j t t | d � d S( Ni� R R R ( R R R t assertRaisest AttributeErrort getattrR ( R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_BE_no_shortcut; s c C s5 t j d d t d t �} | j t t | d � d S( Ni� R R R ( R R R R R R ( R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_LE_no_shortcutB s c C s� t j d � } | j d | j � � | j t d � | � � | j d | j � � | j t d � | � � xP t d d � D]? } | j | | j � � | j t d � t | � | � � q} W| j d | j � � | j t d � | � � d S( Ni� i s i s i i s s ( R R R t next_valuet bt xranget bchr( R R t i( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_BE_defaultsG s 'c C s� t j d d t �} | j d | j � � | j t d � | � � | j d | j � � | j t d � | � � xP t d d � D]? } | j | | j � � | j t | � t d � | � � q� W| j d | j � � | j t d � | � � d S( Ni� R i s i s i i s s ( R R R R R R R R ( R R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_LE_defaultsT s 'c C s� t j d � } xF t d d � D]5 } | j | | j � � | j t | � | � � q W| j t | j � | j t | � | j t | j � | j t | � d S( Ni i i ( R R R R R R R t OverflowError( R R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_BE8_wraparounda s c C s� t j d d t �} xF t d d � D]5 } | j | | j � � | j t | � | � � q% W| j t | j � | j t | � | j t | j � | j t | � d S( Ni R i i ( R R R R R R R R R ( R R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_LE8_wraparoundl s c C s� t j d d t �} xF t d d � D]5 } | j | | j � � | j t | � | � � q% W| j d | j � � | j t d � | � � | j d | j � � d S( Ni t allow_wraparoundi i i s ( R R R R R R R R ( R R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_BE8_wraparound_allowedw s c C s� t j d d t d t �} xF t d d � D]5 } | j | | j � � | j t | � | � � q+ W| j d | j � � | j t d � | � � | j d | j � � d S( Ni R R i i i s ( R R R R R R R R ( R R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_LE8_wraparound_allowed� s c C s� t j d � } xY t d d � D]H } | j d | j � | j | | j � � | j t | � | � � q W| j d | j � d S( Ni i i i ( R R R R t carryR R ( R R R ( ( sX /opt/plesk/python/2.7/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.pyt test_BE8_carry� s c C s� t j d d t �} xY t d d � D]H } | j d | j � | j | | j � � | j t | � | � � q% W| j d | j � d S( Ni R i i i ( R R R R R R"