mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
4462cb0498
* Use SECP256K1_CONTEXT_NONE when creating signing context, as SECP256K1_CONTEXT_SIGN is deprecated and unnecessary. * Use secp256k1_static_context where applicable.
31 lines
607 B
C++
31 lines
607 B
C++
// Copyright (c) 2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <kernel/context.h>
|
|
|
|
#include <crypto/sha256.h>
|
|
#include <key.h>
|
|
#include <logging.h>
|
|
#include <pubkey.h>
|
|
#include <random.h>
|
|
|
|
#include <string>
|
|
|
|
|
|
namespace kernel {
|
|
|
|
Context::Context()
|
|
{
|
|
std::string sha256_algo = SHA256AutoDetect();
|
|
LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo);
|
|
RandomInit();
|
|
ECC_Start();
|
|
}
|
|
|
|
Context::~Context()
|
|
{
|
|
ECC_Stop();
|
|
}
|
|
|
|
} // namespace kernel
|