Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/include/secp256k1.h
Show First 20 Lines • Show All 279 Lines • ▼ Show 20 Lines | SECP256K1_API void secp256k1_context_set_error_callback( | ||||
void (*fun)(const char* message, void* data), | void (*fun)(const char* message, void* data), | ||||
const void* data | const void* data | ||||
) SECP256K1_ARG_NONNULL(1); | ) SECP256K1_ARG_NONNULL(1); | ||||
/** Create a secp256k1 scratch space object. | /** Create a secp256k1 scratch space object. | ||||
* | * | ||||
* Returns: a newly created scratch space. | * Returns: a newly created scratch space. | ||||
* Args: ctx: an existing context object (cannot be NULL) | * Args: ctx: an existing context object (cannot be NULL) | ||||
* In: max_size: maximum amount of memory to allocate | * In: size: amount of memory to be available as scratch space. Some extra | ||||
* (<100 bytes) will be allocated for extra accounting. | |||||
*/ | */ | ||||
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create( | SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create( | ||||
const secp256k1_context* ctx, | const secp256k1_context* ctx, | ||||
size_t max_size | size_t size | ||||
) SECP256K1_ARG_NONNULL(1); | ) SECP256K1_ARG_NONNULL(1); | ||||
/** Destroy a secp256k1 scratch space. | /** Destroy a secp256k1 scratch space. | ||||
* | * | ||||
* The pointer may not be used afterwards. | * The pointer may not be used afterwards. | ||||
* Args: scratch: space to destroy | * Args: ctx: a secp256k1 context object. | ||||
* scratch: space to destroy | |||||
*/ | */ | ||||
SECP256K1_API void secp256k1_scratch_space_destroy( | SECP256K1_API void secp256k1_scratch_space_destroy( | ||||
const secp256k1_context* ctx, | |||||
secp256k1_scratch_space* scratch | secp256k1_scratch_space* scratch | ||||
); | ) SECP256K1_ARG_NONNULL(1); | ||||
/** Parse a variable-length public key into the pubkey object. | /** Parse a variable-length public key into the pubkey object. | ||||
* | * | ||||
* Returns: 1 if the public key was fully valid. | * Returns: 1 if the public key was fully valid. | ||||
* 0 if the public key could not be parsed or is invalid. | * 0 if the public key could not be parsed or is invalid. | ||||
* Args: ctx: a secp256k1 context object. | * Args: ctx: a secp256k1 context object. | ||||
* Out: pubkey: pointer to a pubkey object. If 1 is returned, it is set to a | * Out: pubkey: pointer to a pubkey object. If 1 is returned, it is set to a | ||||
* parsed version of input. If not, its value is undefined. | * parsed version of input. If not, its value is undefined. | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |