mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
common: Add ECC_Context RAII wrapper for ECC_Start/ECC_Stop
This commit is contained in:
parent
6f1d906438
commit
538fedde1d
2 changed files with 24 additions and 0 deletions
10
src/key.cpp
10
src/key.cpp
|
|
@ -457,3 +457,13 @@ void ECC_Stop() {
|
|||
secp256k1_context_destroy(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
ECC_Context::ECC_Context()
|
||||
{
|
||||
ECC_Start();
|
||||
}
|
||||
|
||||
ECC_Context::~ECC_Context()
|
||||
{
|
||||
ECC_Stop();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue