ssl/tsrc/BC/libcrypto/crypto_test/src/crypto_testBlocks.cpp
branchRCL_3
changeset 9 fa985af77159
parent 0 e4d67989cc36
child 45 4b03adbd26ca
equal deleted inserted replaced
3:18f64da82512 9:fa985af77159
   130         ENTRY( "RC2Test", Ccrypto_test::Rc2Test ),
   130         ENTRY( "RC2Test", Ccrypto_test::Rc2Test ),
   131         ENTRY( "RC4Test", Ccrypto_test::Rc4Test ),
   131         ENTRY( "RC4Test", Ccrypto_test::Rc4Test ),
   132         ENTRY( "RSATest", Ccrypto_test::RsaTest ),
   132         ENTRY( "RSATest", Ccrypto_test::RsaTest ),
   133         ENTRY( "SHATest", Ccrypto_test::ShaTest ),
   133         ENTRY( "SHATest", Ccrypto_test::ShaTest ),
   134         ENTRY( "SHA1Test", Ccrypto_test::Sha1Test ),
   134         ENTRY( "SHA1Test", Ccrypto_test::Sha1Test ),
   135 
   135 		ENTRY( "SHA256Test", Ccrypto_test::Sha256Test ),
       
   136 		ENTRY( "SHA512Test", Ccrypto_test::Sha512Test ),
   136 
   137 
   137         };
   138         };
   138 
   139 
   139     const TInt count = sizeof( KFunctions ) / 
   140     const TInt count = sizeof( KFunctions ) / 
   140                         sizeof( TStifFunctionInfo );
   141                         sizeof( TStifFunctionInfo );
   566     }
   567     }
   567     return ret;
   568     return ret;
   568 
   569 
   569     }                                         
   570     }                                         
   570     
   571     
   571     
   572 TInt Ccrypto_test::Sha256Test( CStifItemParser& /*aItem */)
   572     
   573     {
       
   574     TInt ret=1;
       
   575 
       
   576     if(!cryptotest_init("sha256"))
       
   577     {
       
   578     ret = sha256_main(0,NULL);
       
   579     cryptotest_deinit();
       
   580     	
       
   581     }
       
   582 
       
   583     if(ret==1&&errno==ENOMEM)
       
   584     {
       
   585     	return KErrNoMemory;
       
   586     }
       
   587     return ret;
       
   588 
       
   589     }       
       
   590     
       
   591 TInt Ccrypto_test::Sha512Test( CStifItemParser& /*aItem */)
       
   592     {
       
   593     TInt ret=1;
       
   594 
       
   595     if(!cryptotest_init("sha512"))
       
   596     {
       
   597     ret = sha512_main(0,NULL);
       
   598     cryptotest_deinit();
       
   599     	
       
   600     }
       
   601 
       
   602     if(ret==1&&errno==ENOMEM)
       
   603     {
       
   604     	return KErrNoMemory;
       
   605     }
       
   606     return ret;
       
   607 
       
   608     }   
       
   609 
   573                                        
   610                                        
   574 // -----------------------------------------------------------------------------
   611 // -----------------------------------------------------------------------------
   575 // Ccrypto_test::?member_function
   612 // Ccrypto_test::?member_function
   576 // ?implementation_description
   613 // ?implementation_description
   577 // (other items were commented in a header).
   614 // (other items were commented in a header).