equal
deleted
inserted
replaced
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * ** IMPORTANT ** PublishedPartner API's in this file are published to 3rd party developers via the |
15 * ** IMPORTANT ** API's in this file are published to 3rd party developers via the |
16 * Symbian website. Changes to these API's should be treated as PublishedAll API changes and the Security TA should be consulted. |
16 * Symbian website. Changes to these API's should be treated as PublishedAll API changes and the Security TA should be consulted. |
17 * Padding codes |
17 * Padding codes |
18 * |
18 * |
19 */ |
19 */ |
20 |
20 |
21 |
21 |
22 |
|
23 |
|
24 /** |
22 /** |
25 @file |
23 @file |
26 @publishedPartner |
24 @publishedAll |
27 @released |
25 @released |
28 */ |
26 */ |
29 |
27 |
30 #ifndef __PADDING_H__ |
28 #ifndef __PADDING_H__ |
31 #define __PADDING_H__ |
29 #define __PADDING_H__ |
34 /** |
32 /** |
35 * Abstract base class defining the interface to padding schemes. |
33 * Abstract base class defining the interface to padding schemes. |
36 * |
34 * |
37 * It is designed to be used by both symmetric and asymmetric ciphers. |
35 * It is designed to be used by both symmetric and asymmetric ciphers. |
38 * |
36 * |
39 * @publishedPartner |
|
40 * @released |
|
41 */ |
37 */ |
42 class CPadding : public CBase |
38 class CPadding : public CBase |
43 { |
39 { |
44 public: |
40 public: |
45 /** |
41 /** |
146 /** |
142 /** |
147 * This concrete subclass of CPadding appends no padding. |
143 * This concrete subclass of CPadding appends no padding. |
148 * |
144 * |
149 * aOutput will be a copy of aInput after any call to PadL() or UnPadL(). |
145 * aOutput will be a copy of aInput after any call to PadL() or UnPadL(). |
150 * |
146 * |
151 * @publishedPartner |
|
152 * @released |
|
153 */ |
147 */ |
154 class CPaddingNone:public CPadding |
148 class CPaddingNone:public CPadding |
155 { |
149 { |
156 public: |
150 public: |
157 /** |
151 /** |
189 /** |
183 /** |
190 * This concrete subclass of CPadding implements PKCS#1 v1.5 signature padding. |
184 * This concrete subclass of CPadding implements PKCS#1 v1.5 signature padding. |
191 * |
185 * |
192 * It is intended for use with RSA signing/verifying. |
186 * It is intended for use with RSA signing/verifying. |
193 * |
187 * |
194 * @publishedPartner |
|
195 * @released |
|
196 */ |
188 */ |
197 class CPaddingPKCS1Signature : public CPadding |
189 class CPaddingPKCS1Signature : public CPadding |
198 { |
190 { |
199 public: |
191 public: |
200 /** |
192 /** |
232 |
224 |
233 /** |
225 /** |
234 * This concrete subclass of CPadding implements PKCS#1 v1.5 encryption padding. |
226 * This concrete subclass of CPadding implements PKCS#1 v1.5 encryption padding. |
235 * It is intended for use with RSA encryption/decryption. |
227 * It is intended for use with RSA encryption/decryption. |
236 * |
228 * |
237 * @publishedPartner |
|
238 * @released |
|
239 */ |
229 */ |
240 class CPaddingPKCS1Encryption : public CPadding |
230 class CPaddingPKCS1Encryption : public CPadding |
241 { |
231 { |
242 public: |
232 public: |
243 /** |
233 /** |
281 * data). The TLS spec however states that padding bytes should be the length |
271 * data). The TLS spec however states that padding bytes should be the length |
282 * of the padding - 1. This class implements the latter when padding, but does |
272 * of the padding - 1. This class implements the latter when padding, but does |
283 * not check the padding byes when unpadding, so as to be interoperable with SSL |
273 * not check the padding byes when unpadding, so as to be interoperable with SSL |
284 * 3.0. |
274 * 3.0. |
285 * |
275 * |
286 * @publishedPartner |
|
287 * @released |
|
288 */ |
276 */ |
289 class CPaddingSSLv3 : public CPadding |
277 class CPaddingSSLv3 : public CPadding |
290 { |
278 { |
291 public: |
279 public: |
292 /** |
280 /** |
324 |
312 |
325 /** |
313 /** |
326 * This concrete subclass of CPadding implements padding according to |
314 * This concrete subclass of CPadding implements padding according to |
327 * the PKCS#7/TLS standard. |
315 * the PKCS#7/TLS standard. |
328 * |
316 * |
329 * @publishedPartner |
|
330 * @released |
|
331 */ |
317 */ |
332 class CPaddingPKCS7 : public CPadding |
318 class CPaddingPKCS7 : public CPadding |
333 { |
319 { |
334 public: |
320 public: |
335 /** |
321 /** |