50 virtual ~CAsymmetricCipherBase(); |
50 virtual ~CAsymmetricCipherBase(); |
51 |
51 |
52 /** |
52 /** |
53 Set the public key of this cipher. Reset() is called to reinitialise the cipher. |
53 Set the public key of this cipher. Reset() is called to reinitialise the cipher. |
54 @param aKey the public key. |
54 @param aKey the public key. |
|
55 @leave KErrArgument if aKey is not of the expected type. |
|
56 @leave KErrNotSupported if the key is not of valid length. |
|
57 @leave ... Any of the crypto error codes defined in |
|
58 cryptospi_errs.h or any of the system-wide error codes. |
55 */ |
59 */ |
56 IMPORT_C void SetKeyL(const CKey& aKey); |
60 IMPORT_C void SetKeyL(const CKey& aKey); |
57 |
61 |
58 /** |
62 /** |
59 Set the crypto mode of this cipher. Reset() is called to reinitialise the cipher. |
63 Set the crypto mode of this cipher. Reset() is called to reinitialise the cipher. |
60 @param aCryptoMode crypto mode |
64 @param aCryptoMode crypto mode. |
|
65 @leave KErrNotSupported if the specified mode is not supported. |
|
66 @leave ... Any of the crypto error codes defined in |
|
67 cryptospi_errs.h or any of the system-wide error codes. |
61 */ |
68 */ |
62 IMPORT_C void SetCryptoModeL(TUid aCryptoMode); |
69 IMPORT_C void SetCryptoModeL(TUid aCryptoMode); |
63 |
70 |
64 /** |
71 /** |
65 Set padding Mode of this cipher. Reset() is called to reinitialise the cipher. |
72 Set padding Mode of this cipher. Reset() is called to reinitialise the cipher. |
66 @param aPaddingMode padding mode |
73 @param aPaddingMode padding mode. |
|
74 @leave KErrNotSupported if the specified mode is not supported. |
|
75 @leave ... Any of the crypto error codes defined in |
|
76 cryptospi_errs.h or any of the system-wide error codes. |
67 */ |
77 */ |
68 IMPORT_C void SetPaddingModeL(TUid aPaddingMode); |
78 IMPORT_C void SetPaddingModeL(TUid aPaddingMode); |
69 |
79 |
70 /** |
80 /** |
71 Gets the maximum size of input accepted by this object. |
81 Gets the maximum size of input accepted by this object. |
72 @return The maximum input length allowed in bytes. |
82 @return The maximum input length allowed in bytes. |
|
83 @leave ... Any of the crypto error codes defined in |
|
84 cryptospi_errs.h or any of the system-wide error codes. |
73 */ |
85 */ |
74 IMPORT_C TInt GetMaximumInputLengthL(); |
86 IMPORT_C TInt GetMaximumInputLengthL(); |
75 |
87 |
76 /** |
88 /** |
77 Gets the maximum size of output that can be generated by this object. |
89 Gets the maximum size of output that can be generated by this object. |
78 @return The maximum output length in bytes. |
90 @return The maximum output length in bytes. |
|
91 @leave ... Any of the crypto error codes defined in |
|
92 cryptospi_errs.h or any of the system-wide error codes. |
79 */ |
93 */ |
80 IMPORT_C TInt GetMaximumOutputLengthL(); |
94 IMPORT_C TInt GetMaximumOutputLengthL(); |
81 |
95 |
82 |
96 |
83 protected: |
97 protected: |
111 |
125 |
112 /** |
126 /** |
113 Encrypts or decrypts aInput and appends the result to aOutput. |
127 Encrypts or decrypts aInput and appends the result to aOutput. |
114 @param aInput The input data to be processed. |
128 @param aInput The input data to be processed. |
115 @param aOutput The resulting processed data appended to aOutput. |
129 @param aOutput The resulting processed data appended to aOutput. |
|
130 @leave ... Any of the crypto error codes defined in |
|
131 cryptospi_errs.h or any of the system-wide error codes. |
116 */ |
132 */ |
117 IMPORT_C void ProcessL(const TDesC8& aInput, TDes8& aOutput); |
133 IMPORT_C void ProcessL(const TDesC8& aInput, TDes8& aOutput); |
118 |
134 |
119 private: |
135 private: |
120 |
136 |
148 /** |
164 /** |
149 Encrypts or decrypts aInput and appends the result to aOutput asynchronously |
165 Encrypts or decrypts aInput and appends the result to aOutput asynchronously |
150 @param aInput The input data to be processed. |
166 @param aInput The input data to be processed. |
151 @param aOutput The resulting processed data appended to aOutput. |
167 @param aOutput The resulting processed data appended to aOutput. |
152 @param aRequestStatus |
168 @param aRequestStatus |
|
169 @leave ... Any of the crypto error codes defined in |
|
170 cryptospi_errs.h or any of the system-wide error codes. |
153 */ |
171 */ |
154 IMPORT_C void ProcessL(const TDesC8& aInput, TDes8& aOutput, TRequestStatus& aRequestStatus); |
172 IMPORT_C void ProcessL(const TDesC8& aInput, TDes8& aOutput, TRequestStatus& aRequestStatus); |
155 |
173 |
156 /** |
174 /** |
157 Cancel the outstanding request |
175 Cancel the outstanding request |