MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / TestEncryptSingle

Method TestEncryptSingle

src/wallet/test/wallet_crypto_tests.cpp:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static void TestEncryptSingle(const CCrypter& crypt, const CKeyingMaterial& vchPlaintext,
52 const std::vector<unsigned char>& vchCiphertextCorrect = std::vector<unsigned char>())
53{
54 std::vector<unsigned char> vchCiphertext;
55 crypt.Encrypt(vchPlaintext, vchCiphertext);
56
57 if (!vchCiphertextCorrect.empty())
58 BOOST_CHECK(vchCiphertext == vchCiphertextCorrect);
59
60 const std::vector<unsigned char> vchPlaintext2(vchPlaintext.begin(), vchPlaintext.end());
61 TestDecrypt(crypt, vchCiphertext, vchPlaintext2);
62}
63
64static void TestEncrypt(const CCrypter& crypt, const std::vector<unsigned char>& vchPlaintextIn, \
65 const std::vector<unsigned char>& vchCiphertextCorrect = std::vector<unsigned char>())

Callers

nothing calls this directly

Calls 4

EncryptMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected