Bitcoin ABC
0.30.13
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
namespace
kernel
{
16
17
Context::Context
() {
18
std::string sha256_algo =
SHA256AutoDetect
();
19
LogPrintf
(
"Using the '%s' SHA256 implementation\n"
, sha256_algo);
20
RandomInit
();
21
ECC_Start
();
22
ecc_verify_handle
.reset(
new
ECCVerifyHandle
());
23
}
24
25
Context::~Context
() {
26
ecc_verify_handle
.reset();
27
ECC_Stop
();
28
}
29
30
}
// namespace kernel
ECCVerifyHandle
Users of this module must hold an ECCVerifyHandle.
Definition:
pubkey.h:223
context.h
ECC_Start
void ECC_Start()
Initialize the elliptic curve support.
Definition:
key.cpp:434
ECC_Stop
void ECC_Stop()
Deinitialize the elliptic curve support.
Definition:
key.cpp:451
key.h
logging.h
LogPrintf
#define LogPrintf(...)
Definition:
logging.h:227
kernel
Definition:
init.h:28
pubkey.h
RandomInit
void RandomInit()
Initialize global RNG state and log any CPU features that are used.
Definition:
random.cpp:786
random.h
SHA256AutoDetect
std::string SHA256AutoDetect()
Autodetect the best available SHA256 implementation.
Definition:
sha256.cpp:746
sha256.h
kernel::Context::Context
Context()
Declare default constructor and destructor that are not inline, so code instantiating the kernel::Con...
Definition:
context.cpp:17
kernel::Context::~Context
~Context()
Definition:
context.cpp:25
kernel::Context::ecc_verify_handle
std::unique_ptr< ECCVerifyHandle > ecc_verify_handle
Definition:
context.h:21
Generated on Wed Mar 12 2025 21:31:28 for Bitcoin ABC by
1.9.4