ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ |Jc@s~dZddlmZddlZddlZddlmZddlmZdefdYZ e dkrzendS( s! Unit tests for L{OpenSSL.rand}. i(tmainN(tTestCase(trandt RandTestscBs5eZdZdZdZdZdZRS(cCstjd}|jt|dtjdd}|j||tjdd}|jt|d|jttjd}|jt|ddS(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_bytesiisnum_bytes must not be negativeN(Rtbytest assertEqualtlentassertNotEqualt assertRaisest ValueErrortstr(tselftb1tb2tb3texc((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_bytesscCstjdddS(s? L{OpenSSL.rand.add} adds entropy to the PRNG. t hamburgeriN(Rtadd(R ((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyttest_add scCstjddS(s@ L{OpenSSL.rand.seed} adds entropy to the PRNG. s milk shakeN(Rtseed(R ((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_seed'scCs|jtjdkdS(sx L{OpenSSL.rand.status} returns C{True} if the PRNG has sufficient entropy, C{False} otherwise. iiN(ii(t assertTrueRtstatus(R ((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_status.scCs|j}t|d}|jzTtj|tj|tj}|j|dtj |tj |dWdtj |XdS(sG Test reading and writing of files via rand functions. twiiN( tmktemptfiletcloseRt write_filetoststattST_SIZEt assertEqualst load_filetunlink(R ttmpfiletfObjtsize((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyt test_files9s    (t__name__t __module__RRRRR((((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyRs     t__main__( t__doc__tunittestRRR tOpenSSL.test.utilRtOpenSSLRRR)(((sI/opt/alt/python27/lib64/python2.7/site-packages/OpenSSL/test/test_rand.pyts  @