|
1 /* |
|
2 * Copyright (c) 2006 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 "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: The header file of KeyEncryptor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __KEYENCRYPTOR_H__ |
|
20 #define __KEYENCRYPTOR_H__ |
|
21 |
|
22 #include <e32des8.h> |
|
23 |
|
24 #define KEY_ENCRYPTOR 0x101FB670 |
|
25 |
|
26 const TUid KKeyEncryptorInterfaceUID = { KEY_ENCRYPTOR }; |
|
27 |
|
28 /** |
|
29 * Key Encryptor Interface class |
|
30 * |
|
31 * This class defines the interface for key encryptor which is used |
|
32 * to encrypt the key when it is stored to the keystore and decrypt it back |
|
33 * when the key is used or exported. |
|
34 * |
|
35 * @lib |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class MKeyEncryptor |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Encrypt the data in the given buffer |
|
44 * |
|
45 * @param aBuf data to be encrypted |
|
46 * @return encrypted data |
|
47 */ |
|
48 virtual HBufC8* EncryptL( TDesC8& aBuf )=0; |
|
49 |
|
50 /** |
|
51 * Decrypt the data in the given buffer |
|
52 * |
|
53 * @param aBuf data to be decrypted |
|
54 * @return decrypted data |
|
55 */ |
|
56 virtual HBufC8* DecryptL( TDesC8& aBuf )=0; |
|
57 |
|
58 /** |
|
59 * release the encryptor when not needed |
|
60 * |
|
61 * @param |
|
62 * @return |
|
63 */ |
|
64 virtual void Release()=0; |
|
65 }; |
|
66 |
|
67 #endif //KEYENCRYPTOR_H |
|
68 |
|
69 //EOF |
|
70 |