crypto/weakcryptospi/inc/spi/pluginentrydef.h
changeset 8 35751d3474b7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2006-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 * plugin entry interface & ordinal definition
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedPartner
       
    23  @released
       
    24 */
       
    25  
       
    26 #ifndef __CRYPTOAPI_PLUGINENTRYDEF_H__
       
    27 #define __CRYPTOAPI_PLUGINENTRYDEF_H__
       
    28 
       
    29 #include <cryptospi/plugincharacteristics.h>
       
    30 
       
    31 namespace CryptoSpi
       
    32 	{
       
    33 	class CCryptoParam;
       
    34 	class CCryptoParams;
       
    35 	class MRandom;
       
    36 	class MHash;
       
    37 	class MSymmetricCipher;
       
    38 	class MAsymmetricCipher;
       
    39 	class MSigner;
       
    40 	class MVerifier;
       
    41 	class MKeyAgreement;
       
    42 	class MKeyPairGenerator;
       
    43 	class MAsyncRandom;
       
    44 	class MAsyncHash;
       
    45 	class MAsyncSymmetricCipher;
       
    46 	class MAsyncAsymmetricCipher;
       
    47 	class MAsyncSigner;
       
    48 	class MAsyncVerifier;
       
    49 	class MAsyncKeyAgreement;
       
    50 	class MAsyncKeyPairGenerator;
       
    51 	class CKey;
       
    52 	class CExtendedCharacteristics;
       
    53 	
       
    54 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT		
       
    55 	class MMac;
       
    56 	class MAsyncMac;
       
    57 #endif	
       
    58 	
       
    59 	/**
       
    60 	Crypto plugin entry points ordinals in the plugin DLLs
       
    61 	*/
       
    62 	enum TPluginEntryOrdinal
       
    63 		{
       
    64 		/**
       
    65 		Enumeration function ordinal
       
    66 		*/
       
    67 		EEnumerateCharacteristicsOrdinal=1,
       
    68 		/**
       
    69 		Get Extended Characteristic function ordinal
       
    70 		*/		
       
    71 		EGetExtendedCharacteristicOrdinal=2,
       
    72 		/**
       
    73 		Asymmetric Cipher creation function ordinal
       
    74 		*/		
       
    75 		ECreateAsymmetricCipherOrdinal=3,
       
    76 		/**
       
    77 		Signer creation function ordinal
       
    78 		*/				
       
    79 		ECreateSignerOrdinal=4,
       
    80 		/**
       
    81 		Verifier creation function ordinal
       
    82 		*/						
       
    83 		ECreateVerifierOrdinal=5,
       
    84 		/**
       
    85 		Hash creation function ordinal
       
    86 		*/								
       
    87 		ECreateHashOrdinal=6,
       
    88 		/**
       
    89 		Key agreement creation function ordinal
       
    90 		*/								
       
    91 		ECreateKeyAgreementOrdinal=7,
       
    92 		/**
       
    93 		Key Pair Generator creation function ordinal
       
    94 		*/								
       
    95 		ECreateKeyPairGeneratorOrdinal=8,
       
    96 		/**
       
    97 		Random creation function ordinal
       
    98 		*/										
       
    99 		ECreateRandomOrdinal=9,
       
   100 		/**
       
   101 		Symmetric Cipher creation function ordinal
       
   102 		*/		
       
   103 		ECreateSymmetricCipherOrdinal=10,
       
   104         /**
       
   105 		Symmetric key generator creation function ordinal
       
   106 		*/				
       
   107 		ECreateSymmetricKeyGeneratorOrdinal=11,
       
   108 		/**
       
   109 		Asynchronous Asymmetric Cipher creation function ordinal
       
   110 		*/					
       
   111 		ECreateAsyncAsymmetricCipherOrdinal=12,
       
   112 		/**
       
   113 		Asynchronous Signer creation function ordinal
       
   114 		*/						
       
   115 		ECreateAsyncSignerOrdinal=13,
       
   116 		/**
       
   117 		Asynchronous Verifier creation function ordinal
       
   118 		*/								
       
   119 		ECreateAsyncVerifierOrdinal=14,
       
   120 		/**
       
   121 		Asynchronous Hash creation function ordinal
       
   122 		*/										
       
   123 		ECreateAsyncHashOrdinal=15,
       
   124 		/**
       
   125 		Asynchronous Key agreement creation function ordinal
       
   126 		*/
       
   127 		ECreateAsyncKeyAgreementOrdinal=16,
       
   128 		/**
       
   129 		Asynchronous Key Pair Generator creation function ordinal
       
   130 		*/								
       
   131 		ECreateAsyncKeyPairGeneratorOrdinal=17,
       
   132 		/**
       
   133 		Asynchronous Random creation function ordinal
       
   134 		*/										
       
   135 		ECreateAsyncRandomOrdinal=18,
       
   136 		/**
       
   137 		Asynchronous Symmetric Cipher creation function ordinal
       
   138 		*/		
       
   139 		ECreateAsyncSymmetricCipherOrdinal=19,
       
   140 		/**
       
   141 		Asynchronous Symmetric key generator creation function ordinal
       
   142 		*/		
       
   143 		ECreateAsyncSymmetricKeyGeneratorOrdinal=20,
       
   144 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT			
       
   145 		/**
       
   146 		Mac creation function ordinal
       
   147 		*/								
       
   148 		ECreateMacOrdinal=21,
       
   149 		/**
       
   150 		Asynchronous Mac creation function ordinal
       
   151 		*/										
       
   152 		ECreateAsyncMacOrdinal=22,
       
   153 		/**
       
   154 		Hash creation function ordinal
       
   155 		*/								
       
   156 		ECreateHashOrdinalv2=23,
       
   157 		/**
       
   158 		Asynchronous Mac creation function ordinal
       
   159 		*/										
       
   160 		ECreateAsyncMacOrdinalv2=24,
       
   161 #endif		
       
   162 		};
       
   163 	
       
   164 	/**
       
   165 	Crypto Plugin entry function definition
       
   166 	*/
       
   167 	/**
       
   168 	The enumeration function definition 
       
   169 	@param TUid the interface Uid
       
   170 	@param TInt& the number of the characteristics
       
   171 	@return the pointer to characteristics
       
   172 	*/
       
   173 	typedef const TCharacteristics** (*EnumerateCharacteristicsFunc)(TUid, TInt&);
       
   174 	
       
   175 	/**
       
   176 	The Extended characteristic function definition 
       
   177 	@param TUid the implementation Uid
       
   178 	@param CCryptoParams* the extended characteristics
       
   179 	*/	
       
   180 	typedef void (*GetExtendedCharacteristicsFuncL)(TUid, CExtendedCharacteristics*&);
       
   181 	
       
   182 	/**
       
   183 	Random object Creation function
       
   184 	@param MRandom*& the new created plugin instance, should not be set if leaves with error
       
   185 	@param CCryptoParams* the extra paramters for creation.
       
   186 	@leave System wide error code.
       
   187 	*/
       
   188 	typedef void (*CreateRandomFuncL)(MRandom*&, TUid, const CCryptoParams*);
       
   189 	
       
   190 	/**
       
   191 	 * @deprecated
       
   192 	 *  
       
   193 	 * Hash object Creation function
       
   194 	 * @param	MHash*& the new created plugin instance, should not be set if leaves with error
       
   195 	 * @param 	CCryptoParams* the extra paramters for creation.
       
   196 	 * @leave 	System wide error code.
       
   197 	 */	
       
   198 	typedef void (*CreateHashFuncL)(MHash*&, TUid, TUid, const CKey*, const CCryptoParams*);
       
   199 	
       
   200 	/**
       
   201 	Symmetric Cipher object Creation function
       
   202 	@param MSymmetricCipher*& the new created plugin instance, should not be set if leaves with error
       
   203 	@param CCryptoParams* the extra paramters for creation.
       
   204 	@leave System wide error code.
       
   205 	*/	
       
   206 	typedef void (*CreateSymmetricCipherFuncL)(MSymmetricCipher*&, TUid, const CKey&, TUid, TUid, TUid, const CCryptoParams*);
       
   207 	
       
   208 	/**
       
   209 	Asymmetric Cipher object Creation function
       
   210 	@param MAsymmetricCipher*& the new created plugin instance, should not be set if leaves with error
       
   211 	@param CCryptoParams* the extra paramters for creation.
       
   212 	@leave System wide error code.
       
   213 	*/	
       
   214 	typedef void (*CreateAsymmetricCipherFuncL)(MAsymmetricCipher*&, TUid, const CKey&, TUid, TUid, const CCryptoParams*);
       
   215 
       
   216 	/**
       
   217 	Signer object Creation function
       
   218 	@param MSigner*& the new created plugin instance, should not be set if leaves with error
       
   219 	@param CCryptoParams* the extra paramters for creation.
       
   220 	@leave System wide error code.
       
   221 	*/		
       
   222 	typedef void (*CreateSignerFuncL)(MSigner*&, TUid, const CKey&, TUid, const CCryptoParams*);
       
   223 	
       
   224 	/**
       
   225 	Verifier object Creation function
       
   226 	@param MVerifier*& the new created plugin instance, should not be set if leaves with error
       
   227 	@param CCryptoParams* the extra paramters for creation.
       
   228 	@leave System wide error code.
       
   229 	*/		
       
   230 	typedef void (*CreateVerifierFuncL)(MVerifier*&, TUid, const CKey&, TUid, const CCryptoParams*);
       
   231 
       
   232 	/**
       
   233 	KeyAgreement object Creation function
       
   234 	@param MKeyAgreement*& the new created plugin instance, should not be set if leaves with error
       
   235 	@param CCryptoParams* the extra paramters for creation.
       
   236 	@leave System wide error code.
       
   237 	*/			
       
   238 	typedef void (*CreateKeyAgreementFuncL)(MKeyAgreement*&, TUid, const CKey&, const CCryptoParams*);
       
   239 	
       
   240 	/**
       
   241 	Key Pair Generator object Creation function
       
   242 	@param MKeyPairGenerator*& the new created plugin instance, should not be set if leaves with error
       
   243 	@param CCryptoParams* the extra paramters for creation.
       
   244 	@leave System wide error code.
       
   245 	*/	
       
   246 	typedef void (*CreateKeyPairGeneratorFuncL)(MKeyPairGenerator*&, TUid, const CCryptoParams*);
       
   247 	
       
   248 	/**
       
   249 	Asynchronous Random object Creation function
       
   250 	@param MRandom*& the new created plugin instance, should not be set if leaves with error
       
   251 	@param CCryptoParams* the extra paramters for creation.
       
   252 	@leave System wide error code.
       
   253 	*/
       
   254 	//typedef void (*CreateAsyncRandomFuncL)(MAsyncRandom*&, TUid, const CCryptoParams*);
       
   255 
       
   256 	/**
       
   257 	 * @deprecated
       
   258 	 * 
       
   259 	 * Asynchronous Hash object Creation function
       
   260 	 * @param MHash*& the new created plugin instance, should not be set if leaves with error
       
   261 	 * @param CCryptoParams* the extra paramters for creation.
       
   262 	 * @leave System wide error code.
       
   263 	 */		
       
   264 	//typedef void (*CreateAsyncHashFuncL)(MAsyncHash*&, TUid, TUid, const CKey*, const CCryptoParams*);
       
   265 
       
   266 	/**
       
   267 	Asynchronous Symmetric Cipher object Creation function
       
   268 	@param MSymmetricCipher*& the new created plugin instance, should not be set if leaves with error
       
   269 	@param CCryptoParams* the extra paramters for creation.
       
   270 	@leave System wide error code.
       
   271 	*/	
       
   272 	//typedef void (*CreateAsyncSymmetricCipherFuncL)(MAsyncSymmetricCipher*&, TUid, const CKey&, TUid, TUid, TUid, const CCryptoParams*);
       
   273 	
       
   274 	/**
       
   275 	Asynchronous Asymmetric Cipher object Creation function
       
   276 	@param MAsymmetricCipher*& the new created plugin instance, should not be set if leaves with error
       
   277 	@param CCryptoParams* the extra paramters for creation.
       
   278 	@leave System wide error code.
       
   279 	*/	
       
   280 	//typedef void (*CreateAsyncAsymmetricCipherFuncL)(MAsyncAsymmetricCipher*&, TUid, const CKey&, TUid, TUid, const CCryptoParams*);
       
   281 	
       
   282 	/**
       
   283 	Asynchronous Signer object Creation function
       
   284 	@param MSigner*& the new created plugin instance, should not be set if leaves with error
       
   285 	@param CCryptoParams* the extra paramters for creation.
       
   286 	@leave System wide error code.
       
   287 	*/
       
   288 	//typedef void (*CreateAsyncSignerFuncL)(MAsyncSigner*&, TUid, const CKey&, TUid, const CCryptoParams*);
       
   289 	
       
   290 	/**
       
   291 	Asynchronous Verifier object Creation function
       
   292 	@param MVerifier*& the new created plugin instance, should not be set if leaves with error
       
   293 	@param CCryptoParams* the extra paramters for creation.
       
   294 	@leave System wide error code.
       
   295 	*/			
       
   296 	//typedef void (*CreateAsyncVerifierFuncL)(MAsyncVerifier*&, TUid, const CKey&, TUid, const CCryptoParams*);
       
   297 	
       
   298 	/**
       
   299 	Asynchronous KeyAgreement object Creation function
       
   300 	@param MKeyAgreement*& the new created plugin instance, should not be set if leaves with error
       
   301 	@param CCryptoParams* the extra paramters for creation.
       
   302 	@leave System wide error code.
       
   303 	*/	
       
   304 	//typedef void (*CreateAsyncKeyAgreementFuncL)(MAsyncKeyAgreement*&, TUid, const CKey&, const CCryptoParams*);
       
   305 
       
   306 	/**
       
   307 	Asynchronous Key Pair Generator object Creation function
       
   308 	@param MKeyPairGenerator*& the new created plugin instance, should not be set if leaves with error
       
   309 	@param CCryptoParams* the extra paramters for creation.
       
   310 	@leave System wide error code.
       
   311 	*/
       
   312 	//typedef void (*CreateAsyncKeyPairGeneratorFuncL)(MAsyncKeyPairGenerator*&, TUid, const CCryptoParams*);
       
   313 
       
   314 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT	
       
   315 	
       
   316 	/**
       
   317 	 * Mac object Creation function
       
   318 	 *
       
   319 	 * @param MMac*&   		 the new created plugin instance, should not be set if leaves with error
       
   320 	 * @param TUid   		 the implementation Uid
       
   321 	 * @param aKey   		 Symmetric key for calculating message authentication code value. 
       
   322 	 * @param CCryptoParams* the extra parameters for creation.
       
   323 	 * @leave System wide error code.
       
   324 	 */	
       
   325 	typedef void (*CreateMacFuncL)(MMac*&,const TUid, const CKey&, const CCryptoParams*);
       
   326 	
       
   327 	/**
       
   328 	 * Mac object Creation function
       
   329 	 *
       
   330 	 * @param MAsyncMac*&    the new created plugin instance, should not be set if leaves with error
       
   331 	 * @param TUid   		 the implementation Uid
       
   332 	 * @param aKey   		 Symmetric key for calculating message authentication code value. 
       
   333 	 * @param CCryptoParams* the extra parameters for creation.
       
   334 	 * @leave System wide error code.
       
   335 	 */	
       
   336 	//typedef void (*CreateAsyncMacFuncL)(MAsyncMac*&,const TUid, const CKey&, const CCryptoParams*);
       
   337 	
       
   338 
       
   339 	/**
       
   340 	 * Hash object Creation function
       
   341 	 * @param MHash*& the new created plugin instance, should not be set if leaves with error
       
   342 	 * @param CCryptoParams* the extra paramters for creation.
       
   343 	 * @leave System wide error code.
       
   344 	 */	
       
   345 	typedef void (*CreateHashFuncLv2)(MHash*&, TUid, const CCryptoParams*);
       
   346 
       
   347 	/**
       
   348 	 * Hash object Creation function
       
   349 	 * @param MAsyncHash*& the new created plugin instance, should not be set if leaves with error
       
   350 	 * @param CCryptoParams* the extra paramters for creation.
       
   351 	 * @leave System wide error code.
       
   352 	 */	
       
   353 	//typedef void (*CreateAsyncHashFuncLv2)(MAsyncHash*&, TUid, const CCryptoParams*);
       
   354 #endif	
       
   355 	}
       
   356 
       
   357 #endif //__CRYPTOAPI_PLUGINENTRYDEF_H__