Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | List of all members
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. More...
 
 BasicTestingSetup (const 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. More...
 

Detailed Description

Definition at line 32 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 78 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 97 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 138 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 254 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 189 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 295 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 341 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 68 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 73 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 229 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 66 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 63 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 64 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 1089 of file crypto_tests.cpp.

Here is the call graph for this function:

◆ TestSHA512()

void crypto_tests::CryptoTest::TestSHA512 ( 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:

◆ 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 35 of file crypto_tests.cpp.

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

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