mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-11 17:57:14 +01:00
The key module's functionality is not used by the kernel library, but currently kernel users are still required to initialize the key module's `secp256k1_context_sign` global as part of the `kernel::Context` through `ECC_Start`.
23 lines
512 B
C++
23 lines
512 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 <logging.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();
|
|
}
|
|
|
|
|
|
} // namespace kernel
|