MCPcopy Create free account
hub / github.com/ElementsProject/elements / TestDecrypt

Method TestDecrypt

src/wallet/test/wallet_crypto_tests.cpp:43–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static void TestDecrypt(const CCrypter& crypt, const std::vector<unsigned char>& vchCiphertext, \
44 const std::vector<unsigned char>& vchPlaintext = std::vector<unsigned char>())
45{
46 CKeyingMaterial vchDecrypted;
47 crypt.Decrypt(vchCiphertext, vchDecrypted);
48 if (vchPlaintext.size())
49 BOOST_CHECK(CKeyingMaterial(vchPlaintext.begin(), vchPlaintext.end()) == vchDecrypted);
50}
51
52static void TestEncryptSingle(const CCrypter& crypt, const CKeyingMaterial& vchPlaintext,
53 const std::vector<unsigned char>& vchCiphertextCorrect = std::vector<unsigned char>())

Callers

nothing calls this directly

Calls 4

DecryptMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected