Bitcoin Core
24.1.0
P2P Digital Currency
src
kernel
context.cpp
Go to the documentation of this file.
1
// Copyright (c) 2022 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#include <
kernel/context.h
>
6
7
#include <
crypto/sha256.h
>
8
#include <
key.h
>
9
#include <logging.h>
10
#include <
pubkey.h
>
11
#include <random.h>
12
13
#include <string>
14
15
16
namespace
kernel
{
17
18
Context::Context
()
19
{
20
std::string sha256_algo =
SHA256AutoDetect
();
21
LogPrintf
(
"Using the '%s' SHA256 implementation\n"
, sha256_algo);
22
RandomInit
();
23
ECC_Start
();
24
ecc_verify_handle
.reset(
new
ECCVerifyHandle
());
25
}
26
27
Context::~Context
()
28
{
29
ecc_verify_handle
.reset();
30
ECC_Stop
();
31
}
32
33
}
// namespace kernel
pubkey.h
kernel
Definition:
coinstatsindex.h:13
SHA256AutoDetect
std::string SHA256AutoDetect()
Autodetect the best available SHA256 implementation.
Definition:
sha256.cpp:582
ECCVerifyHandle
Users of this module must hold an ECCVerifyHandle.
Definition:
pubkey.h:335
ECC_Start
ECC_Start()
Definition:
key.cpp:392
kernel::Context::ecc_verify_handle
std::unique_ptr< ECCVerifyHandle > ecc_verify_handle
Definition:
context.h:21
kernel::Context::~Context
~Context()
Definition:
context.cpp:27
ECC_Stop
ECC_Stop()
Definition:
key.cpp:409
RandomInit
RandomInit()
Definition:
random.cpp:701
context.h
kernel::Context::Context
Context()
Declare default constructor and destructor that are not inline, so code instantiating the kernel::Con...
Definition:
context.cpp:18
key.h
LogPrintf
#define LogPrintf(...)
Definition:
logging.h:234
sha256.h
Generated on Tue May 16 2023 12:00:00 for Bitcoin Core by
1.8.14