16 Commits

Author SHA1 Message Date
Jonas Nick
da7bc1b803
include: in doc, remove article in front of "pointer" 2024-01-05 13:06:50 +00:00
Hennadii Stepanov
9f1b1904a3
refactor: Replace SECP256K1_API_VAR with SECP256K1_API 2023-07-03 13:57:16 +01:00
Jonas Nick
3d1f430f9f
Make position of * in pointer declarations in include/ consistent 2023-03-28 19:39:02 +00:00
Tim Ruffing
914276e4d2 build: Add SECP256K1_API_VAR to fix importing variables from DLLs
This fixes a build issue with MSVC. While MSVC imports *functions*
from DLLs automatically when building a consumer of the DLL, it does
not import *variables* automatically. In these cases, we need an
explicit __declspec(dllimport).

This commit simply changes our logic to what the libtool manual
suggests, which has a very comprehensive writeup on the topic. Note
that in particular, this solution is carefully designed not to break
static linking. However, as described in the libtool manual,
statically linking the library with MSVC will output warning LNK4217.
This is still the best solution overall, because the warning is
merely a cosmetic issue.
2023-02-06 21:44:56 +01:00
Elichai Turkel
f4edfc7581 Improve consistency for NULL arguments in the public interface 2021-07-04 12:47:45 +03:00
Jonas Nick
22911ee6da Rename private key to secret key in public API (with the exception of function names) 2020-03-30 20:51:47 +00:00
Tim Ruffing
eb45ef3384 Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
and improve style of the ECDH docs.
2020-02-14 16:18:00 +01:00
Rusty Russell
4b48a43106 doc: document the length requirements of output parameter.
It's subtle, since it is actually only touched by hashfp (though
we assert it's non-NULL), but give explicit advice in the default
case.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-10 11:11:11 +10:30
Kirill Fomichev
c8fbc3c397 [ECDH API change] Allow pass arbitrary data to hash function 2018-05-17 00:38:58 +03:00
Kirill Fomichev
b00be65056 [ECDH API change] Support custom hash function 2018-05-17 00:05:09 +03:00
Dan Raviv
abe2d3e84b Fix header guards using reserved identifiers
Identifiers starting with an underscore and followed immediately by a capital letter are reserved by the C++ standard.

The only header guards not fixed are those in the headers auto-generated from java.
2017-08-26 18:44:21 +03:00
Jonas Schnelli
37100d7284
improve ECDH header-doc
- use pubkey instead of point
- use privkey instead of scalar
2015-10-05 20:50:59 +02:00
Gregory Maxwell
118cd8210f Use explicit symbol visibility.
The use of static makes this somewhat redundant currently, though if
 we later have multiple compilation units it will be needed.

This also sets the dllexport needed for shared libraries on win32.
2015-09-25 05:42:20 +00:00
Pieter Wuille
dd891e0ed5 Get rid of _t as it is POSIX reserved 2015-09-21 21:03:37 +02:00
Pieter Wuille
dc0ce9fc41 [API BREAK] Change argument order to out/outin/in 2015-09-04 17:45:57 +02:00
Andrew Poelstra
0739bbb6f0 Add ECDH module which works by hashing the output of ecmult_const 2015-08-01 10:57:33 -05:00