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

Unified Diff: crypto/nss_util.h

Issue 7756025: Changed OAuth token+secret encryption to use supplemental user key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
Index: crypto/nss_util.h
===================================================================
--- crypto/nss_util.h (revision 99168)
+++ crypto/nss_util.h (working copy)
@@ -133,6 +133,15 @@
// Same as IsTPMTokenReady() except this attempts to initialize the token
// if necessary.
CRYPTO_EXPORT bool EnsureTPMTokenReady();
+
+// Gets supplemental user key. Creates one in NSS database if it does not exist.
+CRYPTO_EXPORT bool GetSupplementalUserKey(std::string* user_key);
+
+// Encrypt/decrypt |data| with supplemental user key.
+CRYPTO_EXPORT bool EncryptWithSupplementalUserKey(const std::string& data,
+ std::string* encryped_data);
+CRYPTO_EXPORT bool DecryptWithSupplementalUserKey(const std::string& data,
+ std::string* encryped_data);
wtc 2011/09/02 22:31:08 It seems better to move these functions to some ot
#endif
// Convert a NSS PRTime value into a base::Time object.

Powered by Google App Engine
This is Rietveld 408576698