|
1 /** |
|
2 * XMLSec library |
|
3 * |
|
4 * This is free software; see Copyright file in the source |
|
5 * distribution for preciese wording. |
|
6 * |
|
7 * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com> |
|
8 * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
9 */ |
|
10 #ifndef __XMLSEC_SYMBIANCRYPTO_CRYPTO_H__ |
|
11 #define __XMLSEC_SYMBIANCRYPTO_CRYPTO_H__ |
|
12 |
|
13 #ifdef __cplusplus |
|
14 extern "C" { |
|
15 #endif /* __cplusplus */ |
|
16 #include "xmlsecc_config.h" |
|
17 #include "xmlsec_xmlsec.h" |
|
18 #include "xmlsec_keys.h" |
|
19 #include "xmlsec_transforms.h" |
|
20 #include "xmlsec_dl.h" |
|
21 |
|
22 XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_gnutls(void); |
|
23 |
|
24 /** |
|
25 * Init shutdown |
|
26 */ |
|
27 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoInit (void); |
|
28 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoShutdown (void); |
|
29 |
|
30 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr); |
|
31 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoGenerateRandom (xmlSecBufferPtr buffer, |
|
32 xmlSecSize size); |
|
33 |
|
34 /******************************************************************** |
|
35 * |
|
36 * AES transforms |
|
37 * |
|
38 *******************************************************************/ |
|
39 #ifndef XMLSEC_NO_AES |
|
40 /** |
|
41 * xmlSecSymbianCryptoKeyDataAesId: |
|
42 * |
|
43 * The AES key data klass. |
|
44 */ |
|
45 #define xmlSecSymbianCryptoKeyDataAesId \ |
|
46 xmlSecSymbianCryptoKeyDataAesGetKlass() |
|
47 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecSymbianCryptoKeyDataAesGetKlass (void); |
|
48 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoKeyDataAesSet (xmlSecKeyDataPtr data, |
|
49 const xmlSecByte* buf, |
|
50 xmlSecSize bufSize); |
|
51 /** |
|
52 * xmlSecSymbianCryptoTransformAes128CbcId: |
|
53 * |
|
54 * The AES128 CBC cipher transform klass. |
|
55 */ |
|
56 #define xmlSecSymbianCryptoTransformAes128CbcId \ |
|
57 xmlSecSymbianCryptoTransformAes128CbcGetKlass() |
|
58 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformAes128CbcGetKlass(void); |
|
59 |
|
60 /** |
|
61 * xmlSecSymbianCryptoTransformAes192CbcId: |
|
62 * |
|
63 * The AES192 CBC cipher transform klass. |
|
64 */ |
|
65 #define xmlSecSymbianCryptoTransformAes192CbcId \ |
|
66 xmlSecSymbianCryptoTransformAes192CbcGetKlass() |
|
67 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformAes192CbcGetKlass(void); |
|
68 |
|
69 /** |
|
70 * xmlSecSymbianCryptoTransformAes256CbcId: |
|
71 * |
|
72 * The AES256 CBC cipher transform klass. |
|
73 */ |
|
74 #define xmlSecSymbianCryptoTransformAes256CbcId \ |
|
75 xmlSecSymbianCryptoTransformAes256CbcGetKlass() |
|
76 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformAes256CbcGetKlass(void); |
|
77 |
|
78 #endif /* XMLSEC_NO_AES */ |
|
79 |
|
80 /******************************************************************** |
|
81 * |
|
82 * DES transforms |
|
83 * |
|
84 *******************************************************************/ |
|
85 #ifndef XMLSEC_NO_DES |
|
86 /** |
|
87 * xmlSecSymbianCryptoKeyDataDesId: |
|
88 * |
|
89 * The DES key data klass. |
|
90 */ |
|
91 #define xmlSecSymbianCryptoKeyDataDesId \ |
|
92 xmlSecSymbianCryptoKeyDataDesGetKlass() |
|
93 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecSymbianCryptoKeyDataDesGetKlass (void); |
|
94 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoKeyDataDesSet (xmlSecKeyDataPtr data, |
|
95 const xmlSecByte* buf, |
|
96 xmlSecSize bufSize); |
|
97 |
|
98 /** |
|
99 * xmlSecSymbianCryptoTransformDes3CbcId: |
|
100 * |
|
101 * The DES3 CBC cipher transform klass. |
|
102 */ |
|
103 #define xmlSecSymbianCryptoTransformDes3CbcId \ |
|
104 xmlSecSymbianCryptoTransformDes3CbcGetKlass() |
|
105 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformDes3CbcGetKlass(void); |
|
106 |
|
107 #endif /* XMLSEC_NO_DES */ |
|
108 |
|
109 |
|
110 /******************************************************************** |
|
111 * |
|
112 * HMAC transforms |
|
113 * |
|
114 *******************************************************************/ |
|
115 #ifndef XMLSEC_NO_HMAC |
|
116 /** |
|
117 * xmlSecSymbianCryptoKeyDataHmacId: |
|
118 * |
|
119 * The HMAC key klass. |
|
120 */ |
|
121 #define xmlSecSymbianCryptoKeyDataHmacId \ |
|
122 xmlSecSymbianCryptoKeyDataHmacGetKlass() |
|
123 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecSymbianCryptoKeyDataHmacGetKlass (void); |
|
124 XMLSEC_CRYPTO_EXPORT int xmlSecSymbianCryptoKeyDataHmacSet (xmlSecKeyDataPtr data, |
|
125 const xmlSecByte* buf, |
|
126 xmlSecSize bufSize); |
|
127 /** |
|
128 * xmlSecSymbianCryptoTransformHmacMd5Id: |
|
129 * |
|
130 * The HMAC with MD5 signature transform klass. |
|
131 */ |
|
132 #define xmlSecSymbianCryptoTransformHmacMd5Id \ |
|
133 xmlSecSymbianCryptoTransformHmacMd5GetKlass() |
|
134 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformHmacMd5GetKlass(void); |
|
135 #endif /* XMLSEC_NO_HMAC */ |
|
136 |
|
137 /** |
|
138 * xmlSecSymbianCryptoTransformHmacRipemd160Id: |
|
139 * |
|
140 * The HMAC with RipeMD160 signature transform klass. |
|
141 */ |
|
142 #define xmlSecSymbianCryptoTransformHmacRipemd160Id \ |
|
143 xmlSecSymbianCryptoTransformHmacRipemd160GetKlass() |
|
144 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformHmacRipemd160GetKlass(void); |
|
145 |
|
146 /** |
|
147 * xmlSecSymbianCryptoTransformHmacSha1Id: |
|
148 * |
|
149 * The HMAC with SHA1 signature transform klass. |
|
150 */ |
|
151 #define xmlSecSymbianCryptoTransformHmacSha1Id \ |
|
152 xmlSecSymbianCryptoTransformHmacSha1GetKlass() |
|
153 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformHmacSha1GetKlass(void); |
|
154 |
|
155 |
|
156 |
|
157 /******************************************************************** |
|
158 * |
|
159 * SHA1 transform |
|
160 * |
|
161 *******************************************************************/ |
|
162 #ifndef XMLSEC_NO_SHA1 |
|
163 /** |
|
164 * xmlSecSymbianCryptoTransformSha1Id: |
|
165 * |
|
166 * The SHA1 digest transform klass. |
|
167 */ |
|
168 #define xmlSecSymbianCryptoTransformSha1Id \ |
|
169 xmlSecSymbianCryptoTransformSha1GetKlass() |
|
170 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformSha1GetKlass(void); |
|
171 #endif /* XMLSEC_NO_SHA1 */ |
|
172 |
|
173 |
|
174 /******************************************************************** |
|
175 * |
|
176 * RSA transforms |
|
177 * |
|
178 *******************************************************************/ |
|
179 #ifndef XMLSEC_NO_RSA |
|
180 |
|
181 /** |
|
182 * xmlSecSymbianCryptoKeyDataRsaId: |
|
183 * |
|
184 * The RSA key klass. |
|
185 */ |
|
186 #define xmlSecSymbianCryptoKeyDataRsaId \ |
|
187 xmlSecSymbianCryptoKeyDataRsaGetKlass() |
|
188 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecSymbianCryptoKeyDataRsaGetKlass(void); |
|
189 |
|
190 |
|
191 /** |
|
192 * xmlSecSymbianCryptoTransformRsaSha1Id: |
|
193 * |
|
194 * The RSA-SHA1 signature transform klass. |
|
195 */ |
|
196 |
|
197 #define xmlSecSymbianCryptoTransformRsaSha1Id \ |
|
198 xmlSecSymbianCryptoTransformRsaSha1GetKlass() |
|
199 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformRsaSha1GetKlass(void); |
|
200 |
|
201 /** |
|
202 * xmlSecSymbianCryptoTransformRsaPkcs1Id: |
|
203 * |
|
204 * The RSA PKCS1 key transport transform klass. |
|
205 */ |
|
206 #define xmlSecSymbianCryptoTransformRsaPkcs1Id \ |
|
207 xmlSecSymbianCryptoTransformRsaPkcs1GetKlass() |
|
208 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformRsaPkcs1GetKlass(void); |
|
209 |
|
210 /** |
|
211 * xmlSecSymbianCryptoTransformRsaOaepId: |
|
212 * |
|
213 * The RSA PKCS1 key transport transform klass. |
|
214 */ |
|
215 /* |
|
216 #define xmlSecSymbianCryptoTransformRsaOaepId \ |
|
217 xmlSecSymbianCryptoTransformRsaOaepGetKlass() |
|
218 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecSymbianCryptoTransformRsaOaepGetKlass(void); |
|
219 */ |
|
220 #endif /* XMLSEC_NO_RSA */ |
|
221 |
|
222 |
|
223 #ifdef __cplusplus |
|
224 } |
|
225 #endif /* __cplusplus */ |
|
226 |
|
227 #endif /* __XMLSEC_SYMBIANCRYPTO_CRYPTO_H__ */ |
|
228 |
|
229 #define __XMLSEC_SYMBIANCRYPTO_CRYPTO_H__ |