Dash Core  0.12.2.1
P2P Digital Currency
crypter.cpp File Reference
#include "crypter.h"
#include "script/script.h"
#include "script/standard.h"
#include "util.h"
#include <string>
#include <vector>
#include <boost/foreach.hpp>
#include <openssl/aes.h>
#include <openssl/evp.h>

Go to the source code of this file.

Functions

static bool EncryptSecret (const CKeyingMaterial &vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256 &nIV, std::vector< unsigned char > &vchCiphertext)
 
bool EncryptAES256 (const SecureString &sKey, const SecureString &sPlaintext, const std::string &sIV, std::string &sCiphertext)
 
static bool DecryptSecret (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCiphertext, const uint256 &nIV, CKeyingMaterial &vchPlaintext)
 
bool DecryptAES256 (const SecureString &sKey, const std::string &sCiphertext, const std::string &sIV, SecureString &sPlaintext)
 
static bool DecryptKey (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCryptedSecret, const CPubKey &vchPubKey, CKey &key)
 

Function Documentation

◆ DecryptAES256()

bool DecryptAES256 ( const SecureString sKey,
const std::string &  sCiphertext,
const std::string &  sIV,
SecureString sPlaintext 
)

Definition at line 174 of file crypter.cpp.

Referenced by CKeePassIntegrator::CKeePassResponse::decrypt().

◆ DecryptKey()

static bool DecryptKey ( const CKeyingMaterial vMasterKey,
const std::vector< unsigned char > &  vchCryptedSecret,
const CPubKey vchPubKey,
CKey key 
)
static

Definition at line 209 of file crypter.cpp.

Referenced by CCryptoKeyStore::GetKey(), and CCryptoKeyStore::Unlock().

◆ DecryptSecret()

static bool DecryptSecret ( const CKeyingMaterial vMasterKey,
const std::vector< unsigned char > &  vchCiphertext,
const uint256 nIV,
CKeyingMaterial vchPlaintext 
)
static

Definition at line 164 of file crypter.cpp.

Referenced by CCryptoKeyStore::DecryptHDChain(), and DecryptKey().

◆ EncryptAES256()

bool EncryptAES256 ( const SecureString sKey,
const SecureString sPlaintext,
const std::string &  sIV,
std::string &  sCiphertext 
)

Definition at line 125 of file crypter.cpp.

Referenced by CKeePassIntegrator::CKeePassRequest::addStrParameter().

◆ EncryptSecret()

static bool EncryptSecret ( const CKeyingMaterial vMasterKey,
const CKeyingMaterial vchPlaintext,
const uint256 nIV,
std::vector< unsigned char > &  vchCiphertext 
)
static