sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: #ifndef __CRYPTOAPI_H4PLUGINCONFIG_H__ sl@0: #define __CRYPTOAPI_H4PLUGINCONFIG_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "cryptospi/cryptospidef.h" sl@0: sl@0: namespace HwCrypto sl@0: { sl@0: using namespace CryptoSpi; sl@0: sl@0: /** sl@0: Creator Name sl@0: */ sl@0: _ROMLIT16(KSymbian, "Symbian"); sl@0: sl@0: /** sl@0: implementation Name sl@0: */ sl@0: _ROMLIT16(KRandomDescription, "Random"); sl@0: _ROMLIT16(KAesDescription, "Aes"); sl@0: sl@0: sl@0: /** sl@0: For each crypto algorithm implemented in this plugin define sl@0: a plugin-wide unique id to identify it sl@0: a UID that contains the above id sl@0: a table of characteristics sl@0: */ sl@0: sl@0: sl@0: /** sl@0: implementation 7 Random sl@0: */ sl@0: static const TInt32 KCryptoPluginRandom = 0x20001CF3; sl@0: static const TUid KCryptoPluginRandomUid={KCryptoPluginRandom}; sl@0: static const TRandomCharacteristics KRandom_1 = {KRandomInterface, KAlgorithmRandom, KCryptoPluginRandom, &KSymbian, EFalse, ETrue, 6, &KRandomDescription, 100, 90, 3}; sl@0: sl@0: sl@0: /** sl@0: implementation 10 AES sl@0: */ sl@0: static const TInt32 KCryptoPluginAes = 0x20001CF4; sl@0: static const TUid KCryptoPluginAesUid={KCryptoPluginAes}; sl@0: static const TInt32 KAesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7}; sl@0: static const TInt32 KAesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC}; sl@0: sl@0: static const TSymmetricCipherCharacteristics KAes_1 = {KSymmetricCipherInterface, KAlgorithmCipherAes, KCryptoPluginAes, &KSymbian, EFalse, ETrue, 6, &KAesDescription, 100, 90, sl@0: 256, 128, KAesPaddingModes, sizeof(KAesPaddingModes)/sizeof(KAesPaddingModes[0]), KAesCryptoModes, sizeof(KAesCryptoModes)/sizeof(KAesCryptoModes[0]), 3}; sl@0: sl@0: sl@0: sl@0: /** sl@0: For each crypto algorithm type implemented in this plugin list the characteristics sl@0: */ sl@0: sl@0: sl@0: /** sl@0: Random implementation characteristic table sl@0: */ sl@0: sl@0: static const TRandomCharacteristics* const KRandomCharacteristics[]= sl@0: { sl@0: &KRandom_1 sl@0: }; sl@0: sl@0: /** sl@0: Symmetric Cipher implementation characteristic table sl@0: */ sl@0: static const TSymmetricCipherCharacteristics* const KSymmetricCipherCharacteristics[]= sl@0: { sl@0: &KAes_1 sl@0: }; sl@0: sl@0: } sl@0: sl@0: #endif //__CRYPTOAPI_H4PLUGINCONFIG_H__