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

Unified Diff: chromeos/cryptohome/cryptohome_library.h

Issue 25975002: cryptohome: Move Encrypt/DecryptWithSystemSalt() out of CryptohomeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 2 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 | « chromeos/chromeos.gyp ('k') | chromeos/cryptohome/cryptohome_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/cryptohome/cryptohome_library.h
diff --git a/chromeos/cryptohome/cryptohome_library.h b/chromeos/cryptohome/cryptohome_library.h
index 2de89b458a4248e360da90f326d32938e81dd6fb..b427ae2d1eed75b10c4c952764f7d45be9ccb0f2 100644
--- a/chromeos/cryptohome/cryptohome_library.h
+++ b/chromeos/cryptohome/cryptohome_library.h
@@ -36,17 +36,14 @@ class CHROMEOS_EXPORT CryptohomeLibrary {
// Returns system hash in hex encoded ascii format. Note: this may return
// an empty string (e.g. if cryptohome is not running). It is up to the
// calling function to try again after a delay if desired.
+ //
+ // TODO(hashimoto): Make it asynchronous. crbug.com/141009.
virtual std::string GetSystemSalt() = 0;
- // 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 EncryptWithSystemSalt(const std::string& token) = 0;
-
- // Decrypts |token| with the system salt key (stable for the lifetime
- // of the device).
- virtual std::string DecryptWithSystemSalt(
- const std::string& encrypted_token_hex) = 0;
+ // Returns system hash in hex encoded ascii format, cached by a prior call
+ // to GetSystemSalt(). Note: this may return an empty string (e.g. if
+ // GetSystemSalt() is not yet called).
+ virtual std::string GetCachedSystemSalt() = 0;
protected:
CryptohomeLibrary();
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/cryptohome/cryptohome_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698