|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @internalComponent |
|
20 */ |
|
21 #ifndef __IPSECCRYPTO_H__ |
|
22 #define __IPSECCRYPTO_H__ |
|
23 |
|
24 #include <networking/crypto.h> |
|
25 #ifdef SYMBIAN_IPSEC_VOIP_SUPPORT |
|
26 #include "cryptosymmetriccipherapi.h" |
|
27 #include "cryptomacapi.h" |
|
28 #endif // SYMBIAN_IPSEC_VOIP_SUPPORT |
|
29 |
|
30 typedef enum |
|
31 { |
|
32 EAlgorithm_Descbc, |
|
33 EAlgorithm_3Descbc, |
|
34 EAlgorithm_Sha1, |
|
35 EAlgorithm_Md5, |
|
36 EAlgorithm_Aescbc, |
|
37 EAlgorithm_Aesctr, |
|
38 #ifdef SYMBIAN_IPSEC_VOIP_SUPPORT |
|
39 EAlgorithm_AesXcbcMac96, |
|
40 #endif // SYMBIAN_IPSEC_VOIP_SUPPORT |
|
41 EAlgorithm_Max, // Must be the last entry!! |
|
42 } TEayAlgorithm; |
|
43 |
|
44 class CProtocolEay : public CProtocolCrypto |
|
45 { |
|
46 public: |
|
47 CProtocolEay(); |
|
48 ~CProtocolEay() {} // Nothing to cleanup |
|
49 virtual void Identify(TServerProtocolDesc *) const; |
|
50 virtual TUint AlgorithmList(TAlgorithmDesc *&aList); |
|
51 virtual CryptoSpi::CSymmetricCipher* SymmetricCipherL(TUint anAlg, const TDesC8 &aKey); |
|
52 virtual CMessageDigestCrypto* MessageDigest(TUint anAlg); |
|
53 #ifdef SYMBIAN_IPSEC_VOIP_SUPPORT |
|
54 virtual CryptoSpi::CMac* GetMacImplementationL(const TDesC8& aKey); |
|
55 HBufC8* CProtocolEay::RetrieveMacValueL(CryptoSpi::CMac *aMac,const TDesC8& aSourceData ); |
|
56 #endif //SYMBIAN_IPSEC_VOIP_SUPPORT |
|
57 |
|
58 }; |
|
59 |
|
60 #endif |