47
47
#include MBEDTLS_CONFIG_FILE
48
48
#endif
49
49
50
+ #include "mbedtls/export.h"
51
+
50
52
#include <stddef.h>
51
53
#include <stdint.h>
52
54
@@ -123,7 +125,7 @@ typedef struct mbedtls_aes_xts_context
123
125
*
124
126
* \param ctx The AES context to initialize. This must not be \c NULL.
125
127
*/
126
- void mbedtls_aes_init ( mbedtls_aes_context * ctx );
128
+ MBEDCRYPTO_EXPORT void mbedtls_aes_init ( mbedtls_aes_context * ctx );
127
129
128
130
/**
129
131
* \brief This function releases and clears the specified AES context.
@@ -132,7 +134,7 @@ void mbedtls_aes_init( mbedtls_aes_context *ctx );
132
134
* If this is \c NULL, this function does nothing.
133
135
* Otherwise, the context must have been at least initialized.
134
136
*/
135
- void mbedtls_aes_free ( mbedtls_aes_context * ctx );
137
+ MBEDCRYPTO_EXPORT void mbedtls_aes_free ( mbedtls_aes_context * ctx );
136
138
137
139
#if defined(MBEDTLS_CIPHER_MODE_XTS )
138
140
/**
@@ -143,7 +145,7 @@ void mbedtls_aes_free( mbedtls_aes_context *ctx );
143
145
*
144
146
* \param ctx The AES XTS context to initialize. This must not be \c NULL.
145
147
*/
146
- void mbedtls_aes_xts_init ( mbedtls_aes_xts_context * ctx );
148
+ MBEDCRYPTO_EXPORT void mbedtls_aes_xts_init ( mbedtls_aes_xts_context * ctx );
147
149
148
150
/**
149
151
* \brief This function releases and clears the specified AES XTS context.
@@ -152,7 +154,7 @@ void mbedtls_aes_xts_init( mbedtls_aes_xts_context *ctx );
152
154
* If this is \c NULL, this function does nothing.
153
155
* Otherwise, the context must have been at least initialized.
154
156
*/
155
- void mbedtls_aes_xts_free ( mbedtls_aes_xts_context * ctx );
157
+ MBEDCRYPTO_EXPORT void mbedtls_aes_xts_free ( mbedtls_aes_xts_context * ctx );
156
158
#endif /* MBEDTLS_CIPHER_MODE_XTS */
157
159
158
160
/**
@@ -170,7 +172,7 @@ void mbedtls_aes_xts_free( mbedtls_aes_xts_context *ctx );
170
172
* \return \c 0 on success.
171
173
* \return #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH on failure.
172
174
*/
173
- int mbedtls_aes_setkey_enc ( mbedtls_aes_context * ctx , const unsigned char * key ,
175
+ MBEDCRYPTO_EXPORT int mbedtls_aes_setkey_enc ( mbedtls_aes_context * ctx , const unsigned char * key ,
174
176
unsigned int keybits );
175
177
176
178
/**
@@ -188,7 +190,7 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
188
190
* \return \c 0 on success.
189
191
* \return #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH on failure.
190
192
*/
191
- int mbedtls_aes_setkey_dec ( mbedtls_aes_context * ctx , const unsigned char * key ,
193
+ MBEDCRYPTO_EXPORT int mbedtls_aes_setkey_dec ( mbedtls_aes_context * ctx , const unsigned char * key ,
192
194
unsigned int keybits );
193
195
194
196
#if defined(MBEDTLS_CIPHER_MODE_XTS )
@@ -208,7 +210,7 @@ int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key,
208
210
* \return \c 0 on success.
209
211
* \return #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH on failure.
210
212
*/
211
- int mbedtls_aes_xts_setkey_enc ( mbedtls_aes_xts_context * ctx ,
213
+ MBEDCRYPTO_EXPORT int mbedtls_aes_xts_setkey_enc ( mbedtls_aes_xts_context * ctx ,
212
214
const unsigned char * key ,
213
215
unsigned int keybits );
214
216
@@ -228,7 +230,7 @@ int mbedtls_aes_xts_setkey_enc( mbedtls_aes_xts_context *ctx,
228
230
* \return \c 0 on success.
229
231
* \return #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH on failure.
230
232
*/
231
- int mbedtls_aes_xts_setkey_dec ( mbedtls_aes_xts_context * ctx ,
233
+ MBEDCRYPTO_EXPORT int mbedtls_aes_xts_setkey_dec ( mbedtls_aes_xts_context * ctx ,
232
234
const unsigned char * key ,
233
235
unsigned int keybits );
234
236
#endif /* MBEDTLS_CIPHER_MODE_XTS */
@@ -256,7 +258,7 @@ int mbedtls_aes_xts_setkey_dec( mbedtls_aes_xts_context *ctx,
256
258
257
259
* \return \c 0 on success.
258
260
*/
259
- int mbedtls_aes_crypt_ecb ( mbedtls_aes_context * ctx ,
261
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_ecb ( mbedtls_aes_context * ctx ,
260
262
int mode ,
261
263
const unsigned char input [16 ],
262
264
unsigned char output [16 ] );
@@ -303,7 +305,7 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx,
303
305
* \return #MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH
304
306
* on failure.
305
307
*/
306
- int mbedtls_aes_crypt_cbc ( mbedtls_aes_context * ctx ,
308
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_cbc ( mbedtls_aes_context * ctx ,
307
309
int mode ,
308
310
size_t length ,
309
311
unsigned char iv [16 ],
@@ -347,7 +349,7 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
347
349
* smaller than an AES block in size (16 Bytes) or if \p
348
350
* length is larger than 2^20 blocks (16 MiB).
349
351
*/
350
- int mbedtls_aes_crypt_xts ( mbedtls_aes_xts_context * ctx ,
352
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_xts ( mbedtls_aes_xts_context * ctx ,
351
353
int mode ,
352
354
size_t length ,
353
355
const unsigned char data_unit [16 ],
@@ -395,7 +397,7 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
395
397
*
396
398
* \return \c 0 on success.
397
399
*/
398
- int mbedtls_aes_crypt_cfb128 ( mbedtls_aes_context * ctx ,
400
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_cfb128 ( mbedtls_aes_context * ctx ,
399
401
int mode ,
400
402
size_t length ,
401
403
size_t * iv_off ,
@@ -439,7 +441,7 @@ int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx,
439
441
*
440
442
* \return \c 0 on success.
441
443
*/
442
- int mbedtls_aes_crypt_cfb8 ( mbedtls_aes_context * ctx ,
444
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_cfb8 ( mbedtls_aes_context * ctx ,
443
445
int mode ,
444
446
size_t length ,
445
447
unsigned char iv [16 ],
@@ -493,7 +495,7 @@ int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx,
493
495
*
494
496
* \return \c 0 on success.
495
497
*/
496
- int mbedtls_aes_crypt_ofb ( mbedtls_aes_context * ctx ,
498
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_ofb ( mbedtls_aes_context * ctx ,
497
499
size_t length ,
498
500
size_t * iv_off ,
499
501
unsigned char iv [16 ],
@@ -579,7 +581,7 @@ int mbedtls_aes_crypt_ofb( mbedtls_aes_context *ctx,
579
581
*
580
582
* \return \c 0 on success.
581
583
*/
582
- int mbedtls_aes_crypt_ctr ( mbedtls_aes_context * ctx ,
584
+ MBEDCRYPTO_EXPORT int mbedtls_aes_crypt_ctr ( mbedtls_aes_context * ctx ,
583
585
size_t length ,
584
586
size_t * nc_off ,
585
587
unsigned char nonce_counter [16 ],
@@ -599,7 +601,7 @@ int mbedtls_aes_crypt_ctr( mbedtls_aes_context *ctx,
599
601
*
600
602
* \return \c 0 on success.
601
603
*/
602
- int mbedtls_internal_aes_encrypt ( mbedtls_aes_context * ctx ,
604
+ MBEDCRYPTO_EXPORT int mbedtls_internal_aes_encrypt ( mbedtls_aes_context * ctx ,
603
605
const unsigned char input [16 ],
604
606
unsigned char output [16 ] );
605
607
@@ -614,7 +616,7 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
614
616
*
615
617
* \return \c 0 on success.
616
618
*/
617
- int mbedtls_internal_aes_decrypt ( mbedtls_aes_context * ctx ,
619
+ MBEDCRYPTO_EXPORT int mbedtls_internal_aes_decrypt ( mbedtls_aes_context * ctx ,
618
620
const unsigned char input [16 ],
619
621
unsigned char output [16 ] );
620
622
@@ -663,7 +665,7 @@ MBEDTLS_DEPRECATED void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
663
665
* \return \c 0 on success.
664
666
* \return \c 1 on failure.
665
667
*/
666
- int mbedtls_aes_self_test ( int verbose );
668
+ MBEDCRYPTO_EXPORT int mbedtls_aes_self_test ( int verbose );
667
669
668
670
#endif /* MBEDTLS_SELF_TEST */
669
671
0 commit comments