diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-07 19:28:15 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-07 20:01:05 +0000 |
commit | 8aba0d4b4cfdf0103c7bb3096efc45224ad6de6d (patch) | |
tree | 138e47de80db631999e83da784c25447f5f882bf /src/wallet/wallet2.h | |
parent | Merge pull request #1295 (diff) | |
download | monero-8aba0d4b4cfdf0103c7bb3096efc45224ad6de6d.tar.xz |
wallet: encrypt outputs and key images files with the view key
This key is available to both cold and hot wallet.
Authenticated encryption will guard against interception and/or
modification of the file.
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index b34db0b6c..552d2e5bb 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -480,6 +480,12 @@ namespace tools uint64_t import_key_images(const std::vector<std::pair<crypto::key_image, crypto::signature>> &signed_key_images, uint64_t &spent, uint64_t &unspent); void update_pool_state(); + + std::string encrypt(const std::string &plaintext, const crypto::secret_key &skey, bool authenticated = true) const; + std::string encrypt_with_view_secret_key(const std::string &plaintext, bool authenticated = true) const; + std::string decrypt(const std::string &ciphertext, const crypto::secret_key &skey, bool authenticated = true) const; + std::string decrypt_with_view_secret_key(const std::string &ciphertext, bool authenticated = true) const; + private: /*! * \brief Stores wallet information to wallet file. |