wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacWsaKeyIndexMapper.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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 the License "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:   Declaration of the WlanWsaKeyIndexMapper class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 12 %
       
    20 */
       
    21 
       
    22 #ifndef WLANWSAKEYINDEXMAPPER_H
       
    23 #define WLANWSAKEYINDEXMAPPER_H
       
    24 
       
    25 #ifndef RD_WLAN_DDK
       
    26 #include <wha.h>
       
    27 #else
       
    28 #include <wlanwha.h>
       
    29 #endif
       
    30 
       
    31 /**
       
    32 *  Maps an encryption key index to WHA key entry index.
       
    33 *
       
    34 *  @lib wlanumac.lib
       
    35 *  @since S60 v3.1
       
    36 */
       
    37 class WlanWsaKeyIndexMapper
       
    38     {
       
    39     enum { KWepPairWiseKey   = 4 };
       
    40     enum { KTkipPairWiseKey  = 5 };
       
    41     enum { KTkipGroupKey     = 6 };
       
    42     enum { KAesGroupKey      = 7 };
       
    43     enum { KAesPairWiseKey   = 8 };
       
    44     enum { KWapiPairWiseKey  = KTkipPairWiseKey };
       
    45     enum { KWapiGroupKey     = KTkipGroupKey };
       
    46 
       
    47     public:
       
    48 
       
    49         static TUint8 Extract( 
       
    50             WHA::TKeyType aKeyType, 
       
    51             TUint32 aDefaultKeyNumber = 0 );
       
    52 
       
    53     private:
       
    54 
       
    55         static inline TUint32 HandleWepPairwiseKey();
       
    56         static inline TUint32 HandleWepGroupKey( TUint32 aDefaultKeyNumber );
       
    57         static inline TUint32 HandleTkipGroupKey();
       
    58         static inline TUint32 HandleTkipPairWiseKey();
       
    59         static inline TUint32 HandleAesPairwiseKey();
       
    60         static inline TUint32 HandleAesGroupKey();
       
    61         static inline TUint32 HandleWapiPairwiseKey();
       
    62         static inline TUint32 HandleWapiGroupKey();
       
    63     };
       
    64 
       
    65 #endif  // WLANWSAKEYINDEXMAPPER_H