]> git.codecow.com Git - Monocypher.git/commitdiff
Added extern "C" to optional & deprecated files
authorLoup Vaillant <loup@loup-vaillant.fr>
Mon, 15 Jun 2020 21:54:21 +0000 (23:54 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Mon, 15 Jun 2020 21:54:21 +0000 (23:54 +0200)
src/deprecated/aead-incr.h
src/deprecated/chacha20.h
src/monocypher.h
src/optional/monocypher-ed25519.h

index d9b9d488041022d8d0c0ea3f45ba85969325e18b..c349b1f31feb6ccd7dc17cb91d69a2c78856afbb 100644 (file)
 #include <inttypes.h>
 #include "monocypher.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     crypto_poly1305_ctx poly;
     uint64_t            ad_size;
@@ -131,4 +135,8 @@ void crypto_unlock_update(crypto_unlock_ctx *ctx,
                           size_t             text_size);
 int crypto_unlock_final(crypto_unlock_ctx *ctx, const uint8_t mac[16]);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // AEAD_INCR_H
index fc8f06383901ae2b4df58ddf2c337ddbb6a35e1b..5208a08d5db78aaf6e470ff4a67b607052dbb912 100644 (file)
 #include <stddef.h>
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 // Chacha20
 typedef struct {
     uint8_t  key[32];
@@ -117,5 +121,8 @@ void crypto_chacha20_encrypt(crypto_chacha_ctx *ctx,
 void crypto_chacha20_stream(crypto_chacha_ctx *ctx,
                             uint8_t *stream, size_t size);
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif // CHACHA20_H
index 93e995085e7e878d40b7c2c941206eaacad2dcad..f750552a0c9563057697919fbf44641eee80d384 100644 (file)
@@ -358,5 +358,5 @@ void crypto_x25519_inverse(uint8_t       blind_salt [32],
 #ifdef __cplusplus
 }
 #endif
-    
+
 #endif // MONOCYPHER_H
index 6f43c506427dbf14bc97fb6839024e6406dcc32c..6a40703262fb021c9649a5c9ceb964251554daa7 100644 (file)
 
 #include "monocypher.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 ////////////////////////
 /// Type definitions ///
 ////////////////////////
@@ -138,5 +142,8 @@ void crypto_ed25519_check_init(crypto_check_ctx_abstract *ctx,
 void crypto_from_ed25519_private(uint8_t x25519[32], const uint8_t eddsa[32]);
 #define crypto_from_ed25519_public crypto_from_eddsa_public
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif // ED25519_H