ssl/tsrc/BC/libcrypto/crypto_test/src/crypto_testBlocks.cpp
branchRCL_3
changeset 9 fa985af77159
parent 0 e4d67989cc36
child 45 4b03adbd26ca
--- a/ssl/tsrc/BC/libcrypto/crypto_test/src/crypto_testBlocks.cpp	Sat Feb 20 00:31:00 2010 +0200
+++ b/ssl/tsrc/BC/libcrypto/crypto_test/src/crypto_testBlocks.cpp	Fri Mar 12 15:50:56 2010 +0200
@@ -132,7 +132,8 @@
         ENTRY( "RSATest", Ccrypto_test::RsaTest ),
         ENTRY( "SHATest", Ccrypto_test::ShaTest ),
         ENTRY( "SHA1Test", Ccrypto_test::Sha1Test ),
-
+		ENTRY( "SHA256Test", Ccrypto_test::Sha256Test ),
+		ENTRY( "SHA512Test", Ccrypto_test::Sha512Test ),
 
         };
 
@@ -568,8 +569,44 @@
 
     }                                         
     
+TInt Ccrypto_test::Sha256Test( CStifItemParser& /*aItem */)
+    {
+    TInt ret=1;
+
+    if(!cryptotest_init("sha256"))
+    {
+    ret = sha256_main(0,NULL);
+    cryptotest_deinit();
+    	
+    }
+
+    if(ret==1&&errno==ENOMEM)
+    {
+    	return KErrNoMemory;
+    }
+    return ret;
+
+    }       
     
-    
+TInt Ccrypto_test::Sha512Test( CStifItemParser& /*aItem */)
+    {
+    TInt ret=1;
+
+    if(!cryptotest_init("sha512"))
+    {
+    ret = sha512_main(0,NULL);
+    cryptotest_deinit();
+    	
+    }
+
+    if(ret==1&&errno==ENOMEM)
+    {
+    	return KErrNoMemory;
+    }
+    return ret;
+
+    }   
+
                                        
 // -----------------------------------------------------------------------------
 // Ccrypto_test::?member_function