crypter: constify encrypt/decrypt

This makes CCrypter easier to pass aroundf for tests
This commit is contained in:
Cory Fields
2015-03-26 17:37:29 -04:00
committed by Pieter Wuille
parent 1c391a5866
commit fb96831c1f
2 changed files with 4 additions and 4 deletions

View File

@@ -77,8 +77,8 @@ private:
public:
bool SetKeyFromPassphrase(const SecureString &strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod);
bool Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext);
bool Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext);
bool Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext) const;
bool Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext) const;
bool SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV);
void CleanKey()