rippled
Loading...
Searching...
No Matches
secp256k1.h
1#ifndef XRPL_PROTOCOL_SECP256K1_H_INCLUDED
2#define XRPL_PROTOCOL_SECP256K1_H_INCLUDED
3
4#include <secp256k1.h>
5
6namespace ripple {
7
8template <class = void>
9secp256k1_context const*
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
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
secp256k1_context const * secp256k1Context()
Definition secp256k1.h:10