File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -457,3 +457,13 @@ void ECC_Stop() {
457457 secp256k1_context_destroy (ctx);
458458 }
459459}
460+
461+ ECC_Context::ECC_Context ()
462+ {
463+ ECC_Start ();
464+ }
465+
466+ ECC_Context::~ECC_Context ()
467+ {
468+ ECC_Stop ();
469+ }
Original file line number Diff line number Diff line change @@ -245,4 +245,18 @@ void ECC_Stop();
245245/* * Check that required EC support is available at runtime. */
246246bool ECC_InitSanityCheck ();
247247
248+ /* *
249+ * RAII class initializing and deinitializing global state for elliptic curve support.
250+ * Only one instance may be initialized at a time.
251+ *
252+ * In the future global ECC state could be removed, and this class could contain
253+ * state and be passed as an argument to ECC key functions.
254+ */
255+ class ECC_Context
256+ {
257+ public:
258+ ECC_Context ();
259+ ~ECC_Context ();
260+ };
261+
248262#endif // BITCOIN_KEY_H
You can’t perform that action at this time.
0 commit comments