Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: chrome/browser/chromeos/cros/cert_library.h

Issue 12870010: Add device-level token entryption to CertLibrary. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cert_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/cert_library.h
diff --git a/chrome/browser/chromeos/cros/cert_library.h b/chrome/browser/chromeos/cros/cert_library.h
index da360e7398c29885d49c6f5f4e8c7a0dd0a5fdff..fda3a799d6e1fc3aa4b01e8dc16d84c57c596ba1 100644
--- a/chrome/browser/chromeos/cros/cert_library.h
+++ b/chrome/browser/chromeos/cros/cert_library.h
@@ -101,11 +101,21 @@ class CertLibrary {
// Returns the current list of server CA certificates.
virtual const CertList& GetCACertificates() const = 0;
- // Encrypts |token| with supplemental user key.
+ // Encrypts |token| with the system salt key (stable for the lifetime
+ // of the device). Useful to avoid storing plain text in place like
+ // Local State.
+ virtual std::string EncryptDeviceToken(const std::string& token) = 0;
zel 2013/03/14 20:22:12 EncryptWithSystemSalt might be a better name here.
David Roche 2013/03/14 23:03:29 Done.
+
+ // Decrypts |token| with the system salt key (stable for the lifetime
+ // of the device).
+ virtual std::string DecryptDeviceToken(
+ const std::string& encrypted_token_hex) = 0;
+
+ // Encrypts |token| with supplemental user key (unique for each user).
virtual std::string EncryptToken(const std::string& token) = 0;
zel 2013/03/14 20:22:12 can we rename these to (Encrypt|Decrypt)WithUserKe
David Roche 2013/03/14 23:03:29 Done.
- // Decrypts |token| with supplemental user key.
- virtual std::string DecryptToken(const std::string& encrypted_token) = 0;
+ // Decrypts |token| with supplemental user key (unique for each user).
+ virtual std::string DecryptToken(const std::string& encrypted_token_hex) = 0;
};
} // namespace chromeos
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cert_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698