Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
crypto_tests::CryptoTest Struct Reference
Inheritance diagram for crypto_tests::CryptoTest:
[legend]
Collaboration diagram for crypto_tests::CryptoTest:
[legend]

Public Member Functions

template<typename Hasher, typename In, typename Out>
void TestVector (const Hasher &h, const In &in, const Out &out)
void TestSHA1 (const std::string &in, const std::string &hexout)
void TestSHA256 (const std::string &in, const std::string &hexout)
void TestSHA512 (const std::string &in, const std::string &hexout)
void TestRIPEMD160 (const std::string &in, const std::string &hexout)
void TestHMACSHA256 (const std::string &hexkey, const std::string &hexin, const std::string &hexout)
void TestHMACSHA512 (const std::string &hexkey, const std::string &hexin, const std::string &hexout)
void TestAES256 (const std::string &hexkey, const std::string &hexin, const std::string &hexout)
void TestAES256CBC (const std::string &hexkey, const std::string &hexiv, bool pad, const std::string &hexin, const std::string &hexout)
void TestChaCha20 (const std::string &hex_message, const std::string &hexkey, ChaCha20::Nonce96 nonce, uint32_t seek, const std::string &hexout)
void TestFSChaCha20 (const std::string &hex_plaintext, const std::string &hexkey, uint32_t rekey_interval, const std::string &ciphertext_after_rotation)
void TestPoly1305 (const std::string &hexmessage, const std::string &hexkey, const std::string &hextag)
void TestChaCha20Poly1305 (const std::string &plain_hex, const std::string &aad_hex, const std::string &key_hex, ChaCha20::Nonce96 nonce, const std::string &cipher_hex)
void TestFSChaCha20Poly1305 (const std::string &plain_hex, const std::string &aad_hex, const std::string &key_hex, uint64_t msg_idx, const std::string &cipher_hex)
void TestHKDF_SHA256_32 (const std::string &ikm_hex, const std::string &salt_hex, const std::string &info_hex, const std::string &okm_check_hex)
void TestSHA3_256 (const std::string &input, const std::string &output)
Public Member Functions inherited from BasicTestingSetup
void SeedRandomForTest (SeedRand seed)
 Seed the global RNG state and m_rng for testing and log the seed value.
 BasicTestingSetup (ChainType chainType=ChainType::MAIN, TestOpts={})
 ~BasicTestingSetup ()

Additional Inherited Members

Public Attributes inherited from BasicTestingSetup
util::SignalInterrupt m_interrupt
node::NodeContext m_node
FastRandomContext m_rng
fs::path m_path_root
fs::path m_path_lock
bool m_has_custom_datadir {false}
ArgsManager m_args
 Test-specific arguments and settings.

Detailed Description

Definition at line 33 of file crypto_tests.cpp.

Member Function Documentation

◆ TestAES256()

void crypto_tests::CryptoTest::TestAES256 ( const std::string & hexkey,
const std::string & hexin,
const std::string & hexout )
inline

Definition at line 79 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestAES256CBC()

void crypto_tests::CryptoTest::TestAES256CBC ( const std::string & hexkey,
const std::string & hexiv,
bool pad,
const std::string & hexin,
const std::string & hexout )
inline

Definition at line 98 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestChaCha20()

void crypto_tests::CryptoTest::TestChaCha20 ( const std::string & hex_message,
const std::string & hexkey,
ChaCha20::Nonce96 nonce,
uint32_t seek,
const std::string & hexout )
inline

Definition at line 139 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestChaCha20Poly1305()

void crypto_tests::CryptoTest::TestChaCha20Poly1305 ( const std::string & plain_hex,
const std::string & aad_hex,
const std::string & key_hex,
ChaCha20::Nonce96 nonce,
const std::string & cipher_hex )
inline

Definition at line 255 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestFSChaCha20()

void crypto_tests::CryptoTest::TestFSChaCha20 ( const std::string & hex_plaintext,
const std::string & hexkey,
uint32_t rekey_interval,
const std::string & ciphertext_after_rotation )
inline

Definition at line 190 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestFSChaCha20Poly1305()

void crypto_tests::CryptoTest::TestFSChaCha20Poly1305 ( const std::string & plain_hex,
const std::string & aad_hex,
const std::string & key_hex,
uint64_t msg_idx,
const std::string & cipher_hex )
inline

Definition at line 296 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestHKDF_SHA256_32()

void crypto_tests::CryptoTest::TestHKDF_SHA256_32 ( const std::string & ikm_hex,
const std::string & salt_hex,
const std::string & info_hex,
const std::string & okm_check_hex )
inline

Definition at line 342 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestHMACSHA256()

void crypto_tests::CryptoTest::TestHMACSHA256 ( const std::string & hexkey,
const std::string & hexin,
const std::string & hexout )
inline

Definition at line 69 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestHMACSHA512()

void crypto_tests::CryptoTest::TestHMACSHA512 ( const std::string & hexkey,
const std::string & hexin,
const std::string & hexout )
inline

Definition at line 74 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestPoly1305()

void crypto_tests::CryptoTest::TestPoly1305 ( const std::string & hexmessage,
const std::string & hexkey,
const std::string & hextag )
inline

Definition at line 230 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestRIPEMD160()

void crypto_tests::CryptoTest::TestRIPEMD160 ( const std::string & in,
const std::string & hexout )
inline

Definition at line 67 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestSHA1()

void crypto_tests::CryptoTest::TestSHA1 ( const std::string & in,
const std::string & hexout )
inline

Definition at line 64 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestSHA256()

void crypto_tests::CryptoTest::TestSHA256 ( const std::string & in,
const std::string & hexout )
inline

Definition at line 65 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestSHA3_256()

void CryptoTest::TestSHA3_256 ( const std::string & input,
const std::string & output )

Definition at line 1090 of file crypto_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestSHA512()

void crypto_tests::CryptoTest::TestSHA512 ( const std::string & in,
const std::string & hexout )
inline

Definition at line 66 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestVector()

template<typename Hasher, typename In, typename Out>
void crypto_tests::CryptoTest::TestVector ( const Hasher & h,
const In & in,
const Out & out )
inline

Definition at line 36 of file crypto_tests.cpp.

Here is the caller graph for this function:

The documentation for this struct was generated from the following file: