xrpld
Loading...
Searching...
No Matches
include
xrpl
protocol
detail
secp256k1.h
1
#pragma once
2
3
#include <secp256k1.h>
4
5
namespace
xrpl
{
6
7
template
<
class
=
void
>
8
secp256k1_context
const
*
9
secp256k1Context
()
10
{
11
struct
Holder
12
{
13
secp256k1_context* impl;
14
// SECP256K1_CONTEXT_SIGN and SECP256K1_CONTEXT_VERIFY were deprecated.
15
// All contexts support both signing and verification, so
16
// SECP256K1_CONTEXT_NONE is the correct flag to use.
17
Holder() : impl(secp256k1_context_create(SECP256K1_CONTEXT_NONE))
18
{
19
}
20
21
~Holder()
22
{
23
secp256k1_context_destroy(impl);
24
}
25
};
26
static
Holder
const
kH;
27
return
kH.impl;
28
}
29
30
}
// namespace xrpl
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::secp256k1Context
secp256k1_context const * secp256k1Context()
Definition
secp256k1.h:9
Generated by
1.16.1