diff options
Diffstat (limited to 'src/key.h')
-rw-r--r-- | src/key.h | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -236,13 +236,21 @@ struct CExtKey { void SetSeed(Span<const std::byte> seed); }; -/** Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. */ -void ECC_Start(); - -/** Deinitialize the elliptic curve support. No-op if ECC_Start wasn't called first. */ -void ECC_Stop(); - /** Check that required EC support is available at runtime. */ bool ECC_InitSanityCheck(); +/** + * RAII class initializing and deinitializing global state for elliptic curve support. + * Only one instance may be initialized at a time. + * + * In the future global ECC state could be removed, and this class could contain + * state and be passed as an argument to ECC key functions. + */ +class ECC_Context +{ +public: + ECC_Context(); + ~ECC_Context(); +}; + #endif // BITCOIN_KEY_H |