rtp/srtpstack/tsrc/ut_srtpstack/inc/UT_SRTPAuthentication_HMAC_SHA1.h
changeset 0 307788aac0a8
child 2 1e1cc61f56c3
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __UT_SRTPAUTHENTICATION_HMAC_SHA1_H__
       
    22 #define __UT_SRTPAUTHENTICATION_HMAC_SHA1_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <digia/eunit/ceunittestsuiteclass.h>
       
    26 #include "srtpauthentication_hmac_sha1.h"
       
    27 
       
    28 //  INTERNAL INCLUDES
       
    29 
       
    30 
       
    31 //  FORWARD DECLARATIONS
       
    32 class SRTPAuthentication_HMAC_SHA1;
       
    33 
       
    34 //  CLASS DEFINITION
       
    35 /**
       
    36  *
       
    37  * EUnitWizard generated test class. 
       
    38  *
       
    39  */
       
    40 class UT_SRTPAuthentication_HMAC_SHA1
       
    41      : public CEUnitTestSuiteClass
       
    42     {
       
    43     public:     // Constructors and destructors
       
    44 
       
    45         /**
       
    46          * Two phase construction
       
    47          */
       
    48         static UT_SRTPAuthentication_HMAC_SHA1* NewL();
       
    49         static UT_SRTPAuthentication_HMAC_SHA1* NewLC();
       
    50         /**
       
    51          * Destructor
       
    52          */
       
    53         ~UT_SRTPAuthentication_HMAC_SHA1();
       
    54 
       
    55     private:    // Constructors and destructors
       
    56 
       
    57         UT_SRTPAuthentication_HMAC_SHA1();
       
    58         void ConstructL();
       
    59 
       
    60 	public: 	// From observer interface
       
    61 		
       
    62 		
       
    63 
       
    64     private:    // New methods
       
    65 
       
    66          void SetupL();
       
    67         
       
    68          void Teardown();
       
    69         
       
    70          void UT_AuthenticateL_RFC2202_Test1_80L();
       
    71          void UT_AuthenticateL_RFC2202_Test1_32L();
       
    72          void UT_AuthenticateL_RFC2202_Test2_80L();
       
    73          void UT_AuthenticateL_RFC2202_Test2_32L();
       
    74          void UT_AuthenticateL_RFC2202_Test3_80L();
       
    75          void UT_AuthenticateL_RFC2202_Test3_32L();
       
    76          void UT_AuthenticateL_RFC2202_Test4_80L();
       
    77          void UT_AuthenticateL_RFC2202_Test4_32L();
       
    78          void UT_AuthenticateL_RFC2202_Test5_80L();
       
    79          void UT_AuthenticateL_RFC2202_Test5_32L();
       
    80          void UT_AuthenticateL_RFC2202_Test6_80L();
       
    81          void UT_AuthenticateL_RFC2202_Test6_32L();
       
    82          void UT_AuthenticateL_RFC2202_Test7_80L();
       
    83          void UT_AuthenticateL_RFC2202_Test7_32L();
       
    84          void UT_AuthenticateL_Test8_32L(  );
       
    85          
       
    86          void Hex(HBufC8& aString);                                  
       
    87 
       
    88     private:    // Data
       
    89 
       
    90 
       
    91         CSRTPAuthentication_HMAC_SHA1* iAuthenticator;    
       
    92 
       
    93         // RFC 2202 test 1 128 bit key
       
    94         HBufC8* iRFC2202_Test1_Key_160bits;
       
    95         // RFC 2202 test 1 128 bit data
       
    96         HBufC8* iRFC2202_Test1_Data_16bits;
       
    97         // RFC 2202 test 1 80 bit digest/tag
       
    98         HBufC8* iRFC2202_Test1_Tag_80bits;
       
    99         // RFC 2202 test 1 32 bit digest/tag
       
   100         HBufC8* iRFC2202_Test1_Tag_32bits;
       
   101         
       
   102         // RFC 2202 test 2 key
       
   103         HBufC8* iRFC2202_Test2_Key;
       
   104         // RFC 2202 test 2 28 bit data
       
   105         HBufC8* iRFC2202_Test2_Data_28bits;
       
   106         // RFC 2202 test 2 80 bit digest/tag
       
   107         HBufC8* iRFC2202_Test2_Tag_80bits;
       
   108         // RFC 2202 test 2 32 bit digest/tag
       
   109         HBufC8* iRFC2202_Test2_Tag_32bits;
       
   110                 
       
   111         // RFC 2202 test 3 160 bit key
       
   112         HBufC8* iRFC2202_Test3_Key_160bits;
       
   113         // RFC 2202 test 3 400 bit data
       
   114         HBufC8* iRFC2202_Test3_Data_400bits;
       
   115         // RFC 2202 test 3 80 bit digest/tag
       
   116         HBufC8* iRFC2202_Test3_Tag_80bits;        
       
   117         // RFC 2202 test 3 32 bit digest/tag
       
   118         HBufC8* iRFC2202_Test3_Tag_32bits;        
       
   119 
       
   120         // RFC 2202 test 4 200 bit key
       
   121         HBufC8* iRFC2202_Test4_Key_200bits;
       
   122         // RFC 2202 test 4 400 bit data
       
   123         HBufC8* iRFC2202_Test4_Data_400bits;
       
   124         // RFC 2202 test 4 80 bit digest/tag
       
   125         HBufC8* iRFC2202_Test4_Tag_80bits;
       
   126         // RFC 2202 test 4 32 bit digest/tag
       
   127         HBufC8* iRFC2202_Test4_Tag_32bits;
       
   128 
       
   129         // RFC 2202 test 5 200 bit key
       
   130         HBufC8* iRFC2202_Test5_Key_160bits;
       
   131         // RFC 2202 test 5 data
       
   132         HBufC8* iRFC2202_Test5_Data;
       
   133         // RFC 2202 test 5 80 bit digest/tag
       
   134         HBufC8* iRFC2202_Test5_Tag_80bits;
       
   135         // RFC 2202 test 5 32 bit digest/tag
       
   136         HBufC8* iRFC2202_Test5_Tag_32bits;
       
   137         
       
   138         // RFC 2202 test 6 640 bit key
       
   139         HBufC8* iRFC2202_Test6_Key_640bits;
       
   140         // RFC 2202 test 6 54 bit data
       
   141         HBufC8* iRFC2202_Test6_Data_54bits;
       
   142         // RFC 2202 test 6 80 bit digest/tag
       
   143         HBufC8* iRFC2202_Test6_Tag_80bits;
       
   144         // RFC 2202 test 6 32 bit digest/tag
       
   145         HBufC8* iRFC2202_Test6_Tag_32bits;
       
   146 
       
   147         // RFC 2202 test 7 640 bit key
       
   148         HBufC8* iRFC2202_Test7_Key_640bits;
       
   149         // RFC 2202 test 7 73 bit data
       
   150         HBufC8* iRFC2202_Test7_Data_73bits;
       
   151         // RFC 2202 test 7 80 bit digest/tag
       
   152         HBufC8* iRFC2202_Test7_Tag_80bits;
       
   153         // RFC 2202 test 7 32 bit digest/tag
       
   154         HBufC8* iRFC2202_Test7_Tag_32bits;
       
   155 
       
   156 		// TestCase from SRTP open Src
       
   157         HBufC8* iTest8_Key_160bits;
       
   158         HBufC8* iTest8_Data_168bits;
       
   159         HBufC8*	iTest8_Data2_32bits;
       
   160         HBufC8* iTest8_Tag_80bits;
       
   161 		EUNIT_DECLARE_TEST_TABLE; 		
       
   162     };
       
   163 
       
   164 #endif      //  __UT_SRTPAUTHENTICATION_HMAC_SHA1_H__
       
   165 
       
   166 // End of file