File tree Expand file tree Collapse file tree 27 files changed +161
-108
lines changed Expand file tree Collapse file tree 27 files changed +161
-108
lines changed Original file line number Diff line number Diff line change 4949/** Invalid input data. */
5050#define MBEDTLS_ERR_AES_BAD_INPUT_DATA -0x0021
5151
52- #ifdef __cplusplus
53- extern "C" {
54- #endif
55-
5652#if !defined(MBEDTLS_AES_ALT )
5753// Regular implementation
5854//
@@ -96,6 +92,10 @@ typedef struct mbedtls_aes_xts_context {
9692#include "aes_alt.h"
9793#endif /* MBEDTLS_AES_ALT */
9894
95+ #ifdef __cplusplus
96+ extern "C" {
97+ #endif
98+
9999/**
100100 * \brief This function initializes the specified AES context.
101101 *
Original file line number Diff line number Diff line change 3838/** Invalid data input length. */
3939#define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E
4040
41- #ifdef __cplusplus
42- extern "C" {
43- #endif
44-
4541#if !defined(MBEDTLS_ARIA_ALT )
4642// Regular implementation
4743//
@@ -60,6 +56,10 @@ mbedtls_aria_context;
6056#include "aria_alt.h"
6157#endif /* MBEDTLS_ARIA_ALT */
6258
59+ #ifdef __cplusplus
60+ extern "C" {
61+ #endif
62+
6363/**
6464 * \brief This function initializes the specified ARIA context.
6565 *
Original file line number Diff line number Diff line change 2727/** Invalid data input length. */
2828#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026
2929
30- #ifdef __cplusplus
31- extern "C" {
32- #endif
33-
3430#if !defined(MBEDTLS_CAMELLIA_ALT )
3531// Regular implementation
3632//
@@ -48,6 +44,10 @@ mbedtls_camellia_context;
4844#include "camellia_alt.h"
4945#endif /* MBEDTLS_CAMELLIA_ALT */
5046
47+ #ifdef __cplusplus
48+ extern "C" {
49+ #endif
50+
5151/**
5252 * \brief Initialize a CAMELLIA context.
5353 *
Original file line number Diff line number Diff line change 5454/** Authenticated decryption failed. */
5555#define MBEDTLS_ERR_CCM_AUTH_FAILED -0x000F
5656
57- #ifdef __cplusplus
58- extern "C" {
59- #endif
60-
6157#if !defined(MBEDTLS_CCM_ALT )
6258// Regular implementation
6359//
@@ -98,6 +94,10 @@ mbedtls_ccm_context;
9894#include "ccm_alt.h"
9995#endif /* MBEDTLS_CCM_ALT */
10096
97+ #ifdef __cplusplus
98+ extern "C" {
99+ #endif
100+
101101/**
102102 * \brief This function initializes the specified CCM context,
103103 * to make references valid, and prepare the context
Original file line number Diff line number Diff line change 2929/** Invalid input parameter(s). */
3030#define MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA -0x0051
3131
32- #ifdef __cplusplus
33- extern "C" {
34- #endif
35-
3632#if !defined(MBEDTLS_CHACHA20_ALT )
3733
3834typedef struct mbedtls_chacha20_context {
@@ -46,6 +42,10 @@ mbedtls_chacha20_context;
4642#include "chacha20_alt.h"
4743#endif /* MBEDTLS_CHACHA20_ALT */
4844
45+ #ifdef __cplusplus
46+ extern "C" {
47+ #endif
48+
4949/**
5050 * \brief This function initializes the specified ChaCha20 context.
5151 *
Original file line number Diff line number Diff line change 3131/** Authenticated decryption failed: data was not authentic. */
3232#define MBEDTLS_ERR_CHACHAPOLY_AUTH_FAILED -0x0056
3333
34- #ifdef __cplusplus
35- extern "C" {
36- #endif
37-
3834typedef enum {
3935 MBEDTLS_CHACHAPOLY_ENCRYPT , /**< The mode value for performing encryption. */
4036 MBEDTLS_CHACHAPOLY_DECRYPT /**< The mode value for performing decryption. */
@@ -59,6 +55,10 @@ mbedtls_chachapoly_context;
5955#include "chachapoly_alt.h"
6056#endif /* !MBEDTLS_CHACHAPOLY_ALT */
6157
58+ #ifdef __cplusplus
59+ extern "C" {
60+ #endif
61+
6262/**
6363 * \brief This function initializes the specified ChaCha20-Poly1305 context.
6464 *
Original file line number Diff line number Diff line change 2020
2121#include "mbedtls/cipher.h"
2222
23- #ifdef __cplusplus
24- extern "C" {
25- #endif
26-
2723#define MBEDTLS_AES_BLOCK_SIZE 16
2824#define MBEDTLS_DES3_BLOCK_SIZE 8
2925
@@ -72,6 +68,10 @@ struct mbedtls_cmac_context_t {
7268#include "cmac_alt.h"
7369#endif /* !MBEDTLS_CMAC_ALT */
7470
71+ #ifdef __cplusplus
72+ extern "C" {
73+ #endif
74+
7575/**
7676 * \brief This function starts a new CMAC computation
7777 * by setting the CMAC key, and preparing to authenticate
Original file line number Diff line number Diff line change 3030
3131#define MBEDTLS_DES_KEY_SIZE 8
3232
33- #ifdef __cplusplus
34- extern "C" {
35- #endif
36-
3733#if !defined(MBEDTLS_DES_ALT )
3834// Regular implementation
3935//
@@ -66,6 +62,10 @@ mbedtls_des3_context;
6662#include "des_alt.h"
6763#endif /* MBEDTLS_DES_ALT */
6864
65+ #ifdef __cplusplus
66+ extern "C" {
67+ #endif
68+
6969/**
7070 * \brief Initialize DES context
7171 *
Original file line number Diff line number Diff line change @@ -89,10 +89,6 @@ typedef enum {
8989 MBEDTLS_DHM_PARAM_K , /*!< The shared secret = \c G^(XY) mod \c P. */
9090} mbedtls_dhm_parameter ;
9191
92- #ifdef __cplusplus
93- extern "C" {
94- #endif
95-
9692#if !defined(MBEDTLS_DHM_ALT )
9793
9894/**
@@ -116,6 +112,10 @@ mbedtls_dhm_context;
116112#include "dhm_alt.h"
117113#endif /* MBEDTLS_DHM_ALT */
118114
115+ #ifdef __cplusplus
116+ extern "C" {
117+ #endif
118+
119119/**
120120 * \brief This function initializes the DHM context.
121121 *
Original file line number Diff line number Diff line change 3232#include "mbedtls/ecp.h"
3333#include "mbedtls/md.h"
3434
35- #ifdef __cplusplus
36- extern "C" {
37- #endif
38-
3935/**
4036 * Roles in the EC J-PAKE exchange
4137 */
@@ -79,6 +75,10 @@ typedef struct mbedtls_ecjpake_context {
7975#include "ecjpake_alt.h"
8076#endif /* MBEDTLS_ECJPAKE_ALT */
8177
78+ #ifdef __cplusplus
79+ extern "C" {
80+ #endif
81+
8282/**
8383 * \brief Initialize an ECJPAKE context.
8484 *
You can’t perform that action at this time.
0 commit comments