rippled
Loading...
Searching...
No Matches
include
xrpl
protocol
detail
secp256k1.h
1
#ifndef XRPL_PROTOCOL_SECP256K1_H_INCLUDED
2
#define XRPL_PROTOCOL_SECP256K1_H_INCLUDED
3
4
#include <secp256k1.h>
5
6
namespace
ripple
{
7
8
template
<
class
=
void
>
9
secp256k1_context
const
*
10
secp256k1Context
()
11
{
12
struct
holder
13
{
14
secp256k1_context* impl;
15
holder()
16
: impl(secp256k1_context_create(
17
SECP256K1_CONTEXT_VERIFY | SECP256K1_CONTEXT_SIGN))
18
{
19
}
20
21
~holder()
22
{
23
secp256k1_context_destroy(impl);
24
}
25
};
26
static
holder
const
h;
27
return
h.impl;
28
}
29
30
}
// namespace ripple
31
32
#endif
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:6
ripple::secp256k1Context
secp256k1_context const * secp256k1Context()
Definition
secp256k1.h:10
Generated by
1.9.8