os/security/cryptoplugins/cryptospiplugins/test/h4drv/crypto_h4_plugin/pluginconfig.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2007-2009 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: 
    15 *
    16 */
    17 
    18 
    19 /**
    20  @file
    21  @internalComponent
    22  @released
    23 */
    24 #ifndef __CRYPTOAPI_H4PLUGINCONFIG_H__
    25 #define __CRYPTOAPI_H4PLUGINCONFIG_H__
    26 
    27 #include <cryptospi/cryptoparams.h>
    28 #include <e32cmn.h>
    29 #include <cryptospi/romlit.h>
    30 #include "cryptospi/cryptospidef.h"
    31 
    32 namespace HwCrypto
    33 	{
    34 	using namespace CryptoSpi;
    35 
    36 	/**
    37 	Creator Name
    38 	*/
    39 	_ROMLIT16(KSymbian, "Symbian");
    40 	
    41 	/**
    42 	implementation Name
    43 	*/
    44 	_ROMLIT16(KRandomDescription, "Random");
    45 	_ROMLIT16(KAesDescription, "Aes");
    46 
    47 
    48 	/**
    49 	For each crypto algorithm implemented in this plugin define
    50 		a plugin-wide unique id to identify it
    51 		a UID that contains the above id
    52 		a table of characteristics
    53 	*/	
    54 	
    55 	
    56 	/**
    57 	implementation 7 Random
    58 	*/
    59 	static const TInt32 KCryptoPluginRandom = 0x20001CF3;
    60 	static const TUid KCryptoPluginRandomUid={KCryptoPluginRandom};
    61 	static const TRandomCharacteristics KRandom_1 = {KRandomInterface, KAlgorithmRandom, KCryptoPluginRandom, &KSymbian, EFalse, ETrue, 6, &KRandomDescription, 100, 90, 3};	
    62 
    63 
    64 	/**
    65 	implementation 10 AES
    66 	*/
    67 	static const TInt32 KCryptoPluginAes = 0x20001CF4;
    68 	static const TUid KCryptoPluginAesUid={KCryptoPluginAes};
    69 	static const TInt32 KAesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
    70 	static const TInt32 KAesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
    71 	
    72 	static const TSymmetricCipherCharacteristics KAes_1 = {KSymmetricCipherInterface, KAlgorithmCipherAes, KCryptoPluginAes, &KSymbian, EFalse, ETrue, 6, &KAesDescription, 100, 90, 
    73 	256, 128, KAesPaddingModes, sizeof(KAesPaddingModes)/sizeof(KAesPaddingModes[0]), KAesCryptoModes, sizeof(KAesCryptoModes)/sizeof(KAesCryptoModes[0]), 3};
    74 
    75 
    76 
    77 	/**
    78 	For each crypto algorithm type implemented in this plugin list the characteristics
    79 	*/
    80 	
    81 
    82 	/**
    83 	Random implementation characteristic table
    84 	*/
    85 	
    86 	static const TRandomCharacteristics* const KRandomCharacteristics[]=
    87 		{
    88 		&KRandom_1	
    89 		};
    90 		
    91 	/**
    92 	Symmetric Cipher implementation characteristic table
    93 	*/
    94 	static const TSymmetricCipherCharacteristics* const KSymmetricCipherCharacteristics[]=
    95 		{
    96 		&KAes_1
    97 		};
    98 
    99 	}
   100 
   101 #endif //__CRYPTOAPI_H4PLUGINCONFIG_H__