Skip to content

Commit c26b044

Browse files
committed
Add extern "C"
P4:7307202
1 parent 53bff2c commit c26b044

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/external/curve25519-donna/curve25519.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33

44
typedef unsigned char curve25519_key[32];
55

6+
#ifdef __cplusplus
7+
extern "C" {
8+
#endif
9+
610
void curve25519_donna(curve25519_key mypublic, const curve25519_key secret, const curve25519_key basepoint);
711
void curve25519_donna_basepoint(curve25519_key mypublic, const curve25519_key secret);
812

13+
#ifdef __cplusplus
14+
}
15+
#endif
16+
917
#endif /* CURVE25519_H */
1018

src/external/ed25519-donna/ed25519.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ typedef unsigned char ed25519_secret_key[32];
99

1010
typedef unsigned char curved25519_key[32];
1111

12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
1216
void ed25519_publickey(const ed25519_secret_key sk, ed25519_public_key pk);
1317
int ed25519_sign_open(const unsigned char *m, size_t mlen, const ed25519_public_key pk, const ed25519_signature RS);
1418
void ed25519_sign(const unsigned char *m, size_t mlen, const ed25519_secret_key sk, const ed25519_public_key pk, ed25519_signature RS);
@@ -19,5 +23,8 @@ void ed25519_randombytes_unsafe(void *out, size_t count);
1923

2024
void curved25519_scalarmult_basepoint(curved25519_key pk, const curved25519_key e);
2125

26+
#ifdef __cplusplus
27+
}
28+
#endif
2229

2330
#endif // ED25519_H

0 commit comments

Comments
 (0)