17 * RC2 implementation |
17 * RC2 implementation |
18 * |
18 * |
19 */ |
19 */ |
20 |
20 |
21 |
21 |
22 |
|
23 |
|
24 /** |
22 /** |
25 @file |
23 @file |
26 @internalTechnology |
24 @publishedPartner |
|
25 @released |
27 */ |
26 */ |
28 |
27 |
29 #ifndef __RC2_H__ |
28 #ifndef __RC2_H__ |
30 #define __RC2_H__ |
29 #define __RC2_H__ |
31 |
30 |
32 #include "blocktransformation.h" |
31 #include "blocktransformation.h" |
33 |
32 |
|
33 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
34 |
|
35 /** OpenSSL PKCS8 Effective Key Length Compatibility.*/ |
|
36 const TUint KPkcs8CompatibilityBits = 128; |
|
37 |
|
38 /** PKCS12 PBE Effective Key Length Compatibility.*/ |
|
39 const TUint KPkcs12CompatibilityBits = 40; |
|
40 |
|
41 #endif |
|
42 |
34 /** The expanded key length of an RC2 key.*/ |
43 /** The expanded key length of an RC2 key.*/ |
35 const TUint KRC2ExpandedKeyLen = 64; |
44 const TUint KRC2ExpandedKeyLen = 64; |
36 |
45 |
37 /** SSL Effective Key Length Compatibility.*/ |
46 /** SSL Effective Key Length Compatibility.*/ |
38 const TUint KSSLCompatibilityBits = 1024; |
47 const TUint KSSLCompatibilityBits = 1024; |
39 |
48 |
40 /** OpenSSL PKCS8 Effective Key Length Compatibility.*/ |
|
41 const TUint KPkcs8CompatibilityBits = 128; |
|
42 |
|
43 /** The maximum size in bytes for a RC2 key.*/ |
49 /** The maximum size in bytes for a RC2 key.*/ |
44 const TUint KRC2MaxKeySizeBytes = 128; // Max key size in this implementation = 128 bytes |
50 const TUint KRC2MaxKeySizeBytes = 128; // Max key size in this implementation = 128 bytes |
45 |
|
46 /** PKCS12 PBE Effective Key Length Compatibility.*/ |
|
47 const TUint KPkcs12CompatibilityBits = 40; |
|
48 |
51 |
49 /** |
52 /** |
50 * Abstract base class for RC2 encipherment. |
53 * Abstract base class for RC2 encipherment. |
51 * |
54 * |
52 * @publishedPartner |
|
53 * @released |
|
54 */ |
55 */ |
55 class CRC2 : public CBlockTransformation |
56 class CRC2 : public CBlockTransformation |
56 { |
57 { |
57 public: |
58 public: |
58 virtual void Reset(); |
59 virtual void Reset(); |