22 | @@ -23,14 +23,7 @@ bool OldSetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<u
23 | if (nDerivationMethod == 0)
24 | i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha512(), &chSalt[0],
25 | (unsigned char *)&strKeyData[0], strKeyData.size(), nRounds, chKey, chIV);
26 | -
27 | - if (i != (int)WALLET_CRYPTO_KEY_SIZE)
28 | - {
29 | - memory_cleanse(chKey, sizeof(chKey));
Change the sizeof to WALLET_CRYPTO_KEY_SIZE, and WALLET_CRYPTO_IV_SIZE?
@jonasschnelli Yes, that is the correct fix if we want to keep the memory_cleanse(…)-calls. Do we? :-) If so, I'll fix them!
I don't care that much. I personably would try to keep it even if cleaning memory is pointless because I generally follow "test more is better"-approach.