4 * This is free software; see Copyright file in the source
5 * distribution for preciese wording.
7 * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
9 #ifndef __XMLSEC_MSCRYPTO_CRYPTO_H__
10 #define __XMLSEC_MSCRYPTO_CRYPTO_H__
14 #endif /* __cplusplus */
19 #include <xmlsec/xmlsec.h>
20 #include <xmlsec/keys.h>
21 #include <xmlsec/transforms.h>
22 #include <xmlsec/dl.h>
24 XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_mscrypto(void);
29 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoInit (void);
30 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoShutdown (void);
32 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr);
33 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoGenerateRandom (xmlSecBufferPtr buffer,
36 XMLSEC_CRYPTO_EXPORT void xmlSecMSCryptoErrorsDefaultCallback(const char* file,
39 const char* errorObject,
40 const char* errorSubject,
47 XMLSEC_CRYPTO_EXPORT BYTE* xmlSecMSCryptoCertStrToName (DWORD dwCertEncodingType,
54 /********************************************************************
58 *******************************************************************/
62 * xmlSecMSCryptoKeyDataDsaId:
66 #define xmlSecMSCryptoKeyDataDsaId \
67 xmlSecMSCryptoKeyDataDsaGetKlass()
68 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDsaGetKlass (void);
71 * xmlSecMSCryptoTransformDsaSha1Id:
73 * The DSA SHA1 signature transform klass.
75 #define xmlSecMSCryptoTransformDsaSha1Id \
76 xmlSecMSCryptoTransformDsaSha1GetKlass()
77 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformDsaSha1GetKlass(void);
79 #endif /* XMLSEC_NO_DSA */
81 /********************************************************************
85 *******************************************************************/
86 #ifndef XMLSEC_NO_GOST
89 * xmlSecMSCryptoKeyDataGost2001Id:
91 * The GOST2001 key klass.
93 #define xmlSecMSCryptoKeyDataGost2001Id \
94 xmlSecMSCryptoKeyDataGost2001GetKlass()
95 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataGost2001GetKlass (void);
98 * xmlSecMSCryptoTransformGost2001GostR3411_94Id:
100 * The GOST2001 GOSTR3411_94 signature transform klass.
102 #define xmlSecMSCryptoTransformGost2001GostR3411_94Id \
103 xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass()
104 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass(void);
106 #endif /* XMLSEC_NO_GOST */
108 /********************************************************************
112 *******************************************************************/
113 #ifndef XMLSEC_NO_RSA
116 * xmlSecMSCryptoKeyDataRsaId:
120 #define xmlSecMSCryptoKeyDataRsaId \
121 xmlSecMSCryptoKeyDataRsaGetKlass()
122 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataRsaGetKlass(void);
126 * xmlSecMSCryptoTransformRsaSha1Id:
128 * The RSA-SHA1 signature transform klass.
131 #define xmlSecMSCryptoTransformRsaSha1Id \
132 xmlSecMSCryptoTransformRsaSha1GetKlass()
133 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaSha1GetKlass(void);
136 * xmlSecMSCryptoTransformRsaPkcs1Id:
138 * The RSA PKCS1 key transport transform klass.
140 #define xmlSecMSCryptoTransformRsaPkcs1Id \
141 xmlSecMSCryptoTransformRsaPkcs1GetKlass()
142 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaPkcs1GetKlass(void);
145 * xmlSecMSCryptoTransformRsaOaepId:
147 * The RSA PKCS1 key transport transform klass.
150 #define xmlSecMSCryptoTransformRsaOaepId \
151 xmlSecMSCryptoTransformRsaOaepGetKlass()
152 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaOaepGetKlass(void);
154 #endif /* XMLSEC_NO_RSA */
156 /********************************************************************
160 *******************************************************************/
161 #ifndef XMLSEC_NO_SHA1
164 * xmlSecMSCryptoTransformSha1Id:
166 * The SHA1 digest transform klass.
168 #define xmlSecMSCryptoTransformSha1Id \
169 xmlSecMSCryptoTransformSha1GetKlass()
170 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformSha1GetKlass(void);
171 #endif /* XMLSEC_NO_SHA1 */
173 /********************************************************************
175 * GOSTR3411_94 transform
177 *******************************************************************/
178 #ifndef XMLSEC_NO_GOST
181 * xmlSecMSCryptoTransformGostR3411_94Id:
183 * The GOSTR3411_94 digest transform klass.
185 #define xmlSecMSCryptoTransformGostR3411_94Id \
186 xmlSecMSCryptoTransformGostR3411_94GetKlass()
187 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGostR3411_94GetKlass(void);
188 #endif /* XMLSEC_NO_GOST */
190 /********************************************************************
194 *******************************************************************/
195 #ifndef XMLSEC_NO_AES
197 * xmlSecMSCryptoKeyDataAesId:
199 * The AES key data klass.
201 #define xmlSecMSCryptoKeyDataAesId \
202 xmlSecMSCryptoKeyDataAesGetKlass()
203 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataAesGetKlass(void);
204 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeyDataAesSet (xmlSecKeyDataPtr data,
205 const xmlSecByte* buf,
208 * xmlSecMSCryptoTransformAes128CbcId:
210 * The AES128 CBC cipher transform klass.
212 #define xmlSecMSCryptoTransformAes128CbcId \
213 xmlSecMSCryptoTransformAes128CbcGetKlass()
214 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes128CbcGetKlass(void);
217 * xmlSecMSCryptoTransformAes192CbcId:
219 * The AES192 CBC cipher transform klass.
221 #define xmlSecMSCryptoTransformAes192CbcId \
222 xmlSecMSCryptoTransformAes192CbcGetKlass()
223 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes192CbcGetKlass(void);
226 * xmlSecMSCryptoTransformAes256CbcId:
228 * The AES256 CBC cipher transform klass.
230 #define xmlSecMSCryptoTransformAes256CbcId \
231 xmlSecMSCryptoTransformAes256CbcGetKlass()
232 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes256CbcGetKlass(void);
234 #endif /* XMLSEC_NO_AES */
237 /********************************************************************
241 *******************************************************************/
242 #ifndef XMLSEC_NO_DES
245 * xmlSecMSCryptoKeyDataDesId:
247 * The DES key data klass.
249 #define xmlSecMSCryptoKeyDataDesId \
250 xmlSecMSCryptoKeyDataDesGetKlass()
251 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDesGetKlass(void);
254 * xmlSecMSCryptoTransformDes3CbcId:
256 * The DES3 CBC cipher transform klass.
258 #define xmlSecMSCryptoTransformDes3CbcId \
259 xmlSecMSCryptoTransformDes3CbcGetKlass()
260 XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformDes3CbcGetKlass(void);
264 #endif /* XMLSEC_NO_DES */
268 #endif /* __cplusplus */
270 #endif /* __XMLSEC_MSCRYPTO_CRYPTO_H__ */
272 #define __XMLSEC_MSCRYPTO_CRYPTO_H__