403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/OpenSSL/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyc
ó
Ê£Mc@s„dZddlmZddlZddlZddlmZmZddlm	Z	defd„ƒYZ
edkr€eƒndS(	s!
Unit tests for L{OpenSSL.rand}.
iÿÿÿÿ(tmainN(tTestCasetb(trandt	RandTestscBseZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„ZRS(cCsF|jttjƒ|jttjdƒ|jttjddƒdS(s
        L{OpenSSL.rand.bytes} raises L{TypeError} if called with the wrong
        number of arguments or with a non-C{int} argument.
        iN(tassertRaisest	TypeErrorRtbytestNone(tself((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_bytes_wrong_argsscCs¡tjdƒ}|jt|ƒdƒtjddƒ}|j||ƒtjddƒ}|jt|ƒdƒ|jttjdƒ}|jt|ƒdƒdS(s®
        Verify that we can obtain bytes from rand_bytes() and
        that they are different each time.  Test the parameter
        of rand_bytes() for bad values.
        i2t	num_bytesiiÿÿÿÿsnum_bytes must not be negativeN(RRtassertEqualtlentassertNotEqualRt
ValueErrortstr(R	tb1tb2tb3texc((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyt
test_bytesscCsq|jttjƒ|jttjtdƒdƒ|jttjddƒ|jttjtdƒddƒdS(s£
        When called with the wrong number of arguments, or with arguments not of
        type C{str} and C{int}, L{OpenSSL.rand.add} raises L{TypeError}.
        tfooiN(RRRtaddRR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_add_wrong_args,scCstjtdƒdƒdS(s?
        L{OpenSSL.rand.add} adds entropy to the PRNG.
        t	hamburgeriN(RRR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_add7scCsL|jttjƒ|jttjdƒ|jttjtdƒdƒdS(s’
        When called with the wrong number of arguments, or with a non-C{str}
        argument, L{OpenSSL.rand.seed} raises L{TypeError}.
        RN(RRRtseedRR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_seed_wrong_args>scCstjtdƒƒdS(s@
        L{OpenSSL.rand.seed} adds entropy to the PRNG.
        s
milk shakeN(RRR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyt	test_seedHscCs|jttjdƒdS(sd
        L{OpenSSL.rand.status} raises L{TypeError} when called with any
        arguments.
        N(RRRtstatusR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_status_wrong_argsOscCs|jtjƒdkƒdS(sx
        L{OpenSSL.rand.status} returns C{True} if the PRNG has sufficient
        entropy, C{False} otherwise.
        iiN(ii(t
assertTrueRR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_statusWscCs{|jttjƒ|jttjdƒ|jttjddƒ|jttjddƒ|jttjdddƒdS(s¡
        L{OpenSSL.rand.egd} raises L{TypeError} when called with the wrong
        number of arguments or with arguments not of type C{str} and C{int}.
        RiN(RRRtegdR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_egd_wrong_argsbs
cCs?tj|jƒƒ}d}|j||kd||fƒdS(sr
        L{OpenSSL.rand.egd} returns C{0} or C{-1} if the EGD socket passed
        to it does not exist.
        iÿÿÿÿis%r not in %rN(iÿÿÿÿi(RR"tmktempR (R	tresulttexpected((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_egd_missingns
	cCs|jttjdƒdS(se
        L{OpenSSL.rand.cleanup} raises L{TypeError} when called with any
        arguments.
        N(RRRtcleanupR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_cleanup_wrong_argszscCs|jtjƒdƒdS(sk
        L{OpenSSL.rand.cleanup} releases the memory used by the PRNG and returns
        C{None}.
        N(tassertIdenticalRR(R(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_cleanup‚scCse|jttjƒ|jttjddƒ|jttjddƒ|jttjdddƒdS(s
        L{OpenSSL.rand.load_file} raises L{TypeError} when called the wrong
        number of arguments or arguments not of type C{str} and C{int}.
        RiN(RRRt	load_fileR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_load_file_wrong_argsŠscCsF|jttjƒ|jttjdƒ|jttjddƒdS(s‘
        L{OpenSSL.rand.write_file} raises L{TypeError} when called with the
        wrong number of arguments or a non-C{str} argument.
        RN(RRRt
write_fileR(R	((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyttest_write_file_wrong_args•scCsŽ|jƒ}t|dƒ}|jƒzTtj|ƒtj|ƒtj}|j|dƒtj	|ƒtj	|dƒWdtj
|ƒXdS(sG
        Test reading and writing of files via rand functions.
        twiiN(R$topentcloseRR.toststattST_SIZEtassertEqualsR,tunlink(R	ttmpfiletfObjtsize((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyt
test_filesŸs


(t__name__t
__module__R
RRRRRRR!R#R'R)R+R-R/R;(((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyRs					
									
t__main__(t__doc__tunittestRR3R4tOpenSSL.test.utilRRtOpenSSLRRR<(((s:/usr/lib/python2.7/dist-packages/OpenSSL/test/test_rand.pyt<module>s¥

Youez - 2016 - github.com/yon3zu
LinuXploit