Skip to content

Commit e18ff7c

Browse files
committed
Make secp256k1_ecdh_{,xonly}_hash_function work on MSVC
1 parent 51391e8 commit e18ff7c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/modules/ecdh/main_impl.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "../../../include/secp256k1_ecdh.h"
1111
#include "../../ecmult_const_impl.h"
1212

13-
static int ecdh_hash_function_sha256(unsigned char *output, const unsigned char *x32, const unsigned char *y32, void *data) {
13+
int secp256k1_ecdh_hash_function_sha256(unsigned char *output, const unsigned char *x32, const unsigned char *y32, void *data) {
1414
unsigned char version = (y32[31] & 0x01) | 0x02;
1515
secp256k1_sha256 sha;
1616
(void)data;
@@ -23,7 +23,7 @@ static int ecdh_hash_function_sha256(unsigned char *output, const unsigned char
2323
return 1;
2424
}
2525

26-
static int ecdh_xonly_hash_function_sha256(unsigned char *output, const unsigned char *x32, void *data) {
26+
int secp256k1_ecdh_xonly_hash_function_sha256(unsigned char *output, const unsigned char *x32, void *data) {
2727
secp256k1_sha256 sha;
2828
(void)data;
2929

@@ -34,9 +34,7 @@ static int ecdh_xonly_hash_function_sha256(unsigned char *output, const unsigned
3434
return 1;
3535
}
3636

37-
const secp256k1_ecdh_hash_function secp256k1_ecdh_hash_function_sha256 = ecdh_hash_function_sha256;
3837
const secp256k1_ecdh_hash_function secp256k1_ecdh_hash_function_default = ecdh_hash_function_sha256;
39-
const secp256k1_ecdh_xonly_hash_function secp256k1_ecdh_xonly_hash_function_sha256 = ecdh_xonly_hash_function_sha256;
4038

4139
int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *output, const secp256k1_pubkey *point, const unsigned char *scalar, secp256k1_ecdh_hash_function hashfp, void *data) {
4240
int ret = 0;

0 commit comments

Comments
 (0)