rtp/srtpstack/inc/msrtpauthentication.h
changeset 0 307788aac0a8
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:    Provides an abstract class for authentication (integrity protection)
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MSRTP_AUTHENTICATION_H__
       
    22 #define __MSRTP_AUTHENTICATION_H__
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class MSRTPAuthentication
       
    27     {
       
    28     public:
       
    29         /**
       
    30         * This function is called by SRTP for authentication/integrity protection
       
    31         * to create authentication tag regardless of the algorithm, 
       
    32         * the default algorith is HMAC-SHA1.
       
    33         * Produces authentication tag based on input key and data M.
       
    34         * result IS truncated to n_tag leftmost bits
       
    35         * @param aBitLength  authentication tag length, 32 or 80 bits
       
    36         * @param aKey  authentication key (n_a)
       
    37         * @param aAuthPortion data to be integrity protected 
       
    38         * @param aRoc packet ROC 
       
    39 	    * Returns HBufC8* authentication tag (untruncated) 
       
    40         */
       
    41         virtual HBufC8* AuthenticateL(TUint aBitLength,
       
    42                                     const TDesC8& aKey, 
       
    43                                     const TDesC8& aAuthPortion,
       
    44                                     const TDesC8& aRoc) = 0;
       
    45 
       
    46         virtual ~MSRTPAuthentication() { };                                
       
    47     };
       
    48 
       
    49 #endif // __MSRTP_AUTHENTICATION_H__