Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_crypto_tests.cpp
// Copyright (c) 2014-2016 The Bitcoin Core developers | // Copyright (c) 2014-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "test/test_bitcoin.h" | #include <utilstrencodings.h> | ||||
#include "utilstrencodings.h" | #include <wallet/crypter.h> | ||||
#include "wallet/crypter.h" | |||||
#include <vector> | #include <test/test_bitcoin.h> | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
#include <openssl/aes.h> | #include <openssl/aes.h> | ||||
#include <openssl/evp.h> | #include <openssl/evp.h> | ||||
#include <vector> | |||||
BOOST_FIXTURE_TEST_SUITE(wallet_crypto_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(wallet_crypto_tests, BasicTestingSetup) | ||||
bool OldSetKeyFromPassphrase(const SecureString &strKeyData, | bool OldSetKeyFromPassphrase(const SecureString &strKeyData, | ||||
const std::vector<uint8_t> &chSalt, | const std::vector<uint8_t> &chSalt, | ||||
const unsigned int nRounds, | const unsigned int nRounds, | ||||
const unsigned int nDerivationMethod, | const unsigned int nDerivationMethod, | ||||
uint8_t *chKey, uint8_t *chIV) { | uint8_t *chKey, uint8_t *chIV) { | ||||
if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE) return false; | if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE) return false; | ||||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |