mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
crypter: add tests for crypter
Verify that results correct (match known values), consistent (encrypt->decrypt matches the original), and compatible with the previous openssl implementation. Also check that failed encrypts/decrypts fail the exact same way as openssl.
This commit is contained in:
committed by
Pieter Wuille
parent
0a36b9af28
commit
34ed64a404
@@ -67,9 +67,15 @@ public:
|
||||
|
||||
typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
|
||||
|
||||
namespace wallet_crypto
|
||||
{
|
||||
class TestCrypter;
|
||||
}
|
||||
|
||||
/** Encryption/decryption context with key information */
|
||||
class CCrypter
|
||||
{
|
||||
friend class wallet_crypto::TestCrypter; // for test access to chKey/chIV
|
||||
private:
|
||||
unsigned char chKey[WALLET_CRYPTO_KEY_SIZE];
|
||||
unsigned char chIV[WALLET_CRYPTO_IV_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user