|
1 /* |
|
2 * Copyright (c) 2004 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCMSRecipientInfo_H |
|
20 #define CCMSRecipientInfo_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "CCMSSequence.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CCMSX509AlgorithmIdentifier; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * Base class for RecipientInfo -type modules |
|
31 * |
|
32 * @lib cms.lib |
|
33 * @since 2.8 |
|
34 */ |
|
35 class CCMSRecipientInfo : public CCMSSequence |
|
36 { |
|
37 |
|
38 public: // Destructor |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 virtual ~CCMSRecipientInfo(); |
|
44 |
|
45 public: // New functions |
|
46 |
|
47 /** |
|
48 * Returns the encoder wrapped within appropriate tag. |
|
49 * Must be implemented in derived classes. |
|
50 * @since 2.8 |
|
51 * @return encoder for a tagged object |
|
52 */ |
|
53 virtual CASN1EncBase* TaggedEncoderLC() const = 0; |
|
54 |
|
55 /** |
|
56 * Getter for version number. |
|
57 * @since 2.8 |
|
58 * @return version (0, 2, 3 or 4) |
|
59 */ |
|
60 IMPORT_C TInt Version() const; |
|
61 |
|
62 /** |
|
63 * Getter for keyEncryptionAlgorithm |
|
64 * @since 2.8 |
|
65 * @return Algorithm identifier |
|
66 */ |
|
67 IMPORT_C const CCMSX509AlgorithmIdentifier& |
|
68 KeyEncryptionAlgorithm() const; |
|
69 |
|
70 /** |
|
71 * Setter for keyEncryptionAlgorithm. Makes a copy. |
|
72 * @since 2.8 |
|
73 * @param aKeyEncryptionAlgorithm Algorithm identifier |
|
74 */ |
|
75 IMPORT_C void SetKeyEncryptionAlgorithmL( |
|
76 const CCMSX509AlgorithmIdentifier& aKeyEncryptionAlgorithm ); |
|
77 |
|
78 protected: // New functions |
|
79 /** |
|
80 * C++ default constructor. |
|
81 */ |
|
82 CCMSRecipientInfo( TInt aVersion ); |
|
83 |
|
84 /** |
|
85 * Constructs the member variables. Makes a copy of |
|
86 * aKeyEncryptionAlgorithm. |
|
87 */ |
|
88 void BaseConstructL( |
|
89 const CCMSX509AlgorithmIdentifier& aKeyEncryptionAlgorithm ); |
|
90 |
|
91 /** |
|
92 * Adds version encoding to root sequence |
|
93 * @param aRoot sequence where version encoding is added |
|
94 */ |
|
95 void AddVersionL( CASN1EncSequence* aRoot ) const; |
|
96 |
|
97 /** |
|
98 * Adds keyEncryptionAlgorithm encoding to root sequence |
|
99 * @param aRoot sequence where keyEncryptionAlgorithm encoding |
|
100 * is added |
|
101 */ |
|
102 void AddKeyEncryptionAlgorithmL( CASN1EncSequence* aRoot ) const; |
|
103 |
|
104 protected: // Data |
|
105 |
|
106 // syntax version number. |
|
107 TInt iVersion; |
|
108 |
|
109 // KeyEncryptionAlgorithmIdentifier, owned |
|
110 CCMSX509AlgorithmIdentifier* iKeyEncryptionAlgorithm; |
|
111 |
|
112 }; |
|
113 |
|
114 #endif // CCMSRecipientInfo_H |
|
115 |
|
116 // End of File |