From 94f778bdebe1438fbe0206621ce44b4e25196e59 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Sat, 26 Nov 2011 06:02:04 +0000 Subject: Implement an mlock()'d string class for storing passphrases SecureString is identical to std::string except with secure_allocator substituting for std::allocator. This makes casting between them impossible, so converting between the two at API boundaries requires calling ::c_str() for now. --- src/crypter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crypter.h') diff --git a/src/crypter.h b/src/crypter.h index e8ca30a8cc..d7f8a39d83 100644 --- a/src/crypter.h +++ b/src/crypter.h @@ -65,7 +65,7 @@ private: bool fKeySet; public: - bool SetKeyFromPassphrase(const std::string &strKeyData, const std::vector& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod); + bool SetKeyFromPassphrase(const SecureString &strKeyData, const std::vector& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod); bool Encrypt(const CKeyingMaterial& vchPlaintext, std::vector &vchCiphertext); bool Decrypt(const std::vector& vchCiphertext, CKeyingMaterial& vchPlaintext); bool SetKey(const CKeyingMaterial& chNewKey, const std::vector& chNewIV); -- cgit v1.2.3