rtp/srtpstack/inc/msrtpkeyderivation.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 key derivation operations
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MSRTP_KEYDERIVATION_H__
       
    22 #define __MSRTP_KEYDERIVATION_H__
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class MSRTPKeyDerivation
       
    27     {
       
    28     public:
       
    29         /**
       
    30         * This function is called by SRTP for key derivation operation (PRF_n)
       
    31         * regardless of the algorithm, the default is AESCM-128
       
    32         * Produces key stream based on input key and IV value.
       
    33         * PRF_n function is used to derive session key from desired master key.
       
    34         * @param aBitLength Encryption key length
       
    35         * @param aKey  Input key.
       
    36         * @param aIV  Integer Value (IV).
       
    37 	    * Returns HBufC8* keystream 
       
    38         */        
       
    39         virtual HBufC8* PRF_128BitL(TUint aBitLength,
       
    40                                 const TDesC8& aKey, 
       
    41                                 const TDesC8& aIV) = 0;
       
    42                                 
       
    43         virtual ~MSRTPKeyDerivation() { };                                
       
    44     };
       
    45 
       
    46 #endif // __MSRTP_KEYDERIVATION_H__