MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / DecryptSecret

Function DecryptSecret

src/wallet/crypter.cpp:117–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117bool DecryptSecret(const CKeyingMaterial& vMasterKey, const vector<unsigned char>& vchCiphertext, const uint256& nIV,
118 CKeyingMaterial& vchPlaintext) {
119 CCrypter cKeyCrypter;
120 vector<unsigned char> chIV(WALLET_CRYPTO_KEY_SIZE);
121 memcpy(&chIV[0], &nIV, WALLET_CRYPTO_KEY_SIZE);
122 if (!cKeyCrypter.SetKey(vMasterKey, chIV))
123 return false;
124 return cKeyCrypter.Decrypt(vchCiphertext, *((CKeyingMaterial*)&vchPlaintext));
125}
126
127bool CCryptoKeyStore::SetCrypted() {
128 LOCK(cs_KeyStore);

Callers 2

UnlockMethod · 0.85
GetKeyMethod · 0.85

Calls 3

memcpyFunction · 0.85
SetKeyMethod · 0.45
DecryptMethod · 0.45

Tested by

no test coverage detected