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