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.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
/**
sl@0
    20
 @file
sl@0
    21
 @internalComponent
sl@0
    22
 @released
sl@0
    23
*/
sl@0
    24
#ifndef __CRYPTOAPI_H4PLUGINCONFIG_H__
sl@0
    25
#define __CRYPTOAPI_H4PLUGINCONFIG_H__
sl@0
    26
sl@0
    27
#include <cryptospi/cryptoparams.h>
sl@0
    28
#include <e32cmn.h>
sl@0
    29
#include <cryptospi/romlit.h>
sl@0
    30
#include "cryptospi/cryptospidef.h"
sl@0
    31
sl@0
    32
namespace HwCrypto
sl@0
    33
	{
sl@0
    34
	using namespace CryptoSpi;
sl@0
    35
sl@0
    36
	/**
sl@0
    37
	Creator Name
sl@0
    38
	*/
sl@0
    39
	_ROMLIT16(KSymbian, "Symbian");
sl@0
    40
	
sl@0
    41
	/**
sl@0
    42
	implementation Name
sl@0
    43
	*/
sl@0
    44
	_ROMLIT16(KRandomDescription, "Random");
sl@0
    45
	_ROMLIT16(KAesDescription, "Aes");
sl@0
    46
sl@0
    47
sl@0
    48
	/**
sl@0
    49
	For each crypto algorithm implemented in this plugin define
sl@0
    50
		a plugin-wide unique id to identify it
sl@0
    51
		a UID that contains the above id
sl@0
    52
		a table of characteristics
sl@0
    53
	*/	
sl@0
    54
	
sl@0
    55
	
sl@0
    56
	/**
sl@0
    57
	implementation 7 Random
sl@0
    58
	*/
sl@0
    59
	static const TInt32 KCryptoPluginRandom = 0x20001CF3;
sl@0
    60
	static const TUid KCryptoPluginRandomUid={KCryptoPluginRandom};
sl@0
    61
	static const TRandomCharacteristics KRandom_1 = {KRandomInterface, KAlgorithmRandom, KCryptoPluginRandom, &KSymbian, EFalse, ETrue, 6, &KRandomDescription, 100, 90, 3};	
sl@0
    62
sl@0
    63
sl@0
    64
	/**
sl@0
    65
	implementation 10 AES
sl@0
    66
	*/
sl@0
    67
	static const TInt32 KCryptoPluginAes = 0x20001CF4;
sl@0
    68
	static const TUid KCryptoPluginAesUid={KCryptoPluginAes};
sl@0
    69
	static const TInt32 KAesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
sl@0
    70
	static const TInt32 KAesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
sl@0
    71
	
sl@0
    72
	static const TSymmetricCipherCharacteristics KAes_1 = {KSymmetricCipherInterface, KAlgorithmCipherAes, KCryptoPluginAes, &KSymbian, EFalse, ETrue, 6, &KAesDescription, 100, 90, 
sl@0
    73
	256, 128, KAesPaddingModes, sizeof(KAesPaddingModes)/sizeof(KAesPaddingModes[0]), KAesCryptoModes, sizeof(KAesCryptoModes)/sizeof(KAesCryptoModes[0]), 3};
sl@0
    74
sl@0
    75
sl@0
    76
sl@0
    77
	/**
sl@0
    78
	For each crypto algorithm type implemented in this plugin list the characteristics
sl@0
    79
	*/
sl@0
    80
	
sl@0
    81
sl@0
    82
	/**
sl@0
    83
	Random implementation characteristic table
sl@0
    84
	*/
sl@0
    85
	
sl@0
    86
	static const TRandomCharacteristics* const KRandomCharacteristics[]=
sl@0
    87
		{
sl@0
    88
		&KRandom_1	
sl@0
    89
		};
sl@0
    90
		
sl@0
    91
	/**
sl@0
    92
	Symmetric Cipher implementation characteristic table
sl@0
    93
	*/
sl@0
    94
	static const TSymmetricCipherCharacteristics* const KSymmetricCipherCharacteristics[]=
sl@0
    95
		{
sl@0
    96
		&KAes_1
sl@0
    97
		};
sl@0
    98
sl@0
    99
	}
sl@0
   100
sl@0
   101
#endif //__CRYPTOAPI_H4PLUGINCONFIG_H__