diff options
author | Darin Petkov <petkov@chromium.org> | 2011-06-29 13:49:28 -0700 |
---|---|---|
committer | Darin Petkov <petkov@chromium.org> | 2011-06-29 16:00:43 -0700 |
commit | 86964e0bae1a38c6817243959026603b4b8c69b7 (patch) | |
tree | 815a2f67646030392aa808aa6fbfd6f1e0c168a9 /key_file_store.h | |
parent | 823c47e9ce362e6ba66ab21b1aa889a1848e3c4c (diff) | |
download | shill-86964e0bae1a38c6817243959026603b4b8c69b7.tar.gz |
shill: Infrastucture for encrypting/decrypting/scrambling store values.
This adds a CryptoProvider that registers and provides access to different
prioritized crypto modules (currently DES-CBC and ROT47). Use the provider in
KeyFileStore to provide an API for getting and setting crypted string values.
BUG=chromium-os:16963
TEST=unit tests
Change-Id: I492516890eb3f527758d354cd8890088cb99dea4
Reviewed-on: http://gerrit.chromium.org/gerrit/3395
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Diffstat (limited to 'key_file_store.h')
-rw-r--r-- | key_file_store.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/key_file_store.h b/key_file_store.h index a9e28548..3e88de27 100644 --- a/key_file_store.h +++ b/key_file_store.h @@ -8,6 +8,7 @@ #include <base/file_path.h> #include <gtest/gtest_prod.h> // for FRIEND_TEST +#include "shill/crypto_provider.h" #include "shill/glib.h" #include "shill/store_interface.h" @@ -49,6 +50,12 @@ class KeyFileStore : public StoreInterface { virtual bool SetInt(const std::string &group, const std::string &key, int value); + virtual bool GetCryptedString(const std::string &group, + const std::string &key, + std::string *value); + virtual bool SetCryptedString(const std::string &group, + const std::string &key, + const std::string &value); private: FRIEND_TEST(KeyFileStoreTest, OpenClose); @@ -57,8 +64,11 @@ class KeyFileStore : public StoreInterface { void ReleaseKeyFile(); GLib *glib_; + CryptoProvider crypto_; GKeyFile *key_file_; FilePath path_; + + DISALLOW_COPY_AND_ASSIGN(KeyFileStore); }; } // namespace shill |