rtp/srtpstack/tsrc/ut_srtpstack/src/UT_CSRTPCipherAESCM128.cpp
branchRCL_3
changeset 9 1e1cc61f56c3
parent 0 307788aac0a8
--- a/rtp/srtpstack/tsrc/ut_srtpstack/src/UT_CSRTPCipherAESCM128.cpp	Fri Feb 19 23:10:33 2010 +0200
+++ b/rtp/srtpstack/tsrc/ut_srtpstack/src/UT_CSRTPCipherAESCM128.cpp	Fri Mar 12 15:44:11 2010 +0200
@@ -23,6 +23,7 @@
 
 //  EXTERNAL INCLUDES
 #include <digia/eunit/eunitmacros.h>
+#include <e32debug.h>
 
 //  INTERNAL INCLUDES
 #include "srtpcipher_aescm128.h"
@@ -212,7 +213,7 @@
     EUNIT_ASSERT( result->Compare(*iRFC3686_TestCipherT256bits) == 0);
 
  	CleanupStack::Pop(result); 	
- 	delete result;    
+ 	delete result;
     }
 
 void UT_CSRTPCipherAESCM128::UT_EncryptL_EncryptData3L(  )
@@ -243,6 +244,12 @@
  	delete result;    
     }
 
+void UT_CSRTPCipherAESCM128::UT_EncryptL_EncryptDataKeyChangesL(  )
+    {
+    UT_EncryptL_EncryptDataL();
+    UT_EncryptL_EncryptData2L();
+    }
+
 void UT_CSRTPCipherAESCM128::UT_EncryptL_DecryptDataL(  )
     {
  	HBufC8* result = iEncryptor->TransformL(*iRFC3686_TestKey128bits, 
@@ -254,7 +261,7 @@
     EUNIT_ASSERT( result->Compare(*iRFC3686_TestPlainT128bits) == 0);
 
  	CleanupStack::Pop(result); 	
- 	delete result;    
+ 	delete result; 
     }
 
 void UT_CSRTPCipherAESCM128::UT_EncryptL_DecryptData2L(  )
@@ -299,6 +306,12 @@
  	delete result;    
     }
 
+void UT_CSRTPCipherAESCM128::UT_EncryptL_DecryptDataKeyChangesL(  )
+    {
+    UT_EncryptL_DecryptDataL();
+    UT_EncryptL_DecryptData2L();
+    }
+
 void UT_CSRTPCipherAESCM128::UT_EncryptL_ErrorTest1L(  )
     {	
     TInt err = KErrNone;
@@ -417,6 +430,13 @@
     SetupL, UT_EncryptL_EncryptData4L, Teardown)
 
 EUNIT_TEST(
+    "EncryptL encrypt data, key changes",
+    "CSRTPCipherAESCM128",
+    "EncryptL",
+    "FUNCTIONALITY",
+    SetupL, UT_EncryptL_EncryptDataKeyChangesL, Teardown)
+    
+EUNIT_TEST(
     "EncryptL decrypt data",
     "CSRTPCipherAESCM128",
     "EncryptL",
@@ -443,6 +463,13 @@
     "EncryptL",
     "FUNCTIONALITY",
     SetupL, UT_EncryptL_DecryptData4L, Teardown)
+    
+EUNIT_TEST(
+    "EncryptL decrypt data, key changes",
+    "CSRTPCipherAESCM128",
+    "EncryptL",
+    "FUNCTIONALITY",
+    SetupL, UT_EncryptL_DecryptDataKeyChangesL, Teardown)
 
 EUNIT_TEST(
     "EncryptL error 1",