UltrafastSecp256k1
3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
Loading...
Searching...
No Matches
ufsecp_error.h
Go to the documentation of this file.
1
/* ============================================================================
2
* UltrafastSecp256k1 -- Error Model
3
* ============================================================================
4
* Every ufsecp_* function returns ufsecp_error_t (0 = success).
5
* For detailed diagnostics, call ufsecp_last_error() / ufsecp_last_error_msg()
6
* on the context that returned the error.
7
*
8
* Thread safety: each ufsecp_ctx owns its own last-error slot.
9
* ============================================================================ */
10
11
#ifndef UFSECP_ERROR_H
12
#define UFSECP_ERROR_H
13
14
#include "
ufsecp_version.h
"
/* pulls in UFSECP_API */
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
20
/* -- Error codes ------------------------------------------------------------ */
21
22
typedef
int
ufsecp_error_t
;
23
24
#define UFSECP_OK 0
25
#define UFSECP_ERR_NULL_ARG 1
26
#define UFSECP_ERR_BAD_KEY 2
27
#define UFSECP_ERR_BAD_PUBKEY 3
28
#define UFSECP_ERR_BAD_SIG 4
29
#define UFSECP_ERR_BAD_INPUT 5
30
#define UFSECP_ERR_VERIFY_FAIL 6
31
#define UFSECP_ERR_ARITH 7
32
#define UFSECP_ERR_SELFTEST 8
33
#define UFSECP_ERR_INTERNAL 9
34
#define UFSECP_ERR_BUF_TOO_SMALL 10
35
#define UFSECP_ERR_NOT_FOUND 11
37
/* -- Error inspection ------------------------------------------------------- */
38
40
UFSECP_API
const
char
*
ufsecp_error_str
(
ufsecp_error_t
err);
41
42
/*
43
* Per-context error inspection (see ufsecp.h for ufsecp_ctx):
44
* ufsecp_error_t ufsecp_last_error (const ufsecp_ctx* ctx);
45
* const char* ufsecp_last_error_msg(const ufsecp_ctx* ctx);
46
*/
47
48
#ifdef __cplusplus
49
}
50
#endif
51
52
#endif
/* UFSECP_ERROR_H */
ufsecp_error_str
UFSECP_API const char * ufsecp_error_str(ufsecp_error_t err)
Definition
ufsecp_impl.cpp:351
ufsecp_error_t
int ufsecp_error_t
Definition
ufsecp_error.h:22
ufsecp_version.h
UFSECP_API
#define UFSECP_API
Definition
ufsecp_version.h:54
include
ufsecp
ufsecp_error.h
Generated by
1.9.8