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

Unified Diff: components/gcm_driver/crypto/gcm_message_cryptographer.h

Issue 1453503002: [NOT FOR REVIEW] Ensure contributory behaviour for Web Push encryption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@push-renames
Patch Set: Created 5 years, 1 month 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: components/gcm_driver/crypto/gcm_message_cryptographer.h
diff --git a/components/gcm_driver/crypto/gcm_message_cryptographer.h b/components/gcm_driver/crypto/gcm_message_cryptographer.h
index e2b299e5860b45fd544e5463da1ff8dde271bfb4..fa52e43109d000bad4a1cafdfa072ed67beec788 100644
--- a/components/gcm_driver/crypto/gcm_message_cryptographer.h
+++ b/components/gcm_driver/crypto/gcm_message_cryptographer.h
@@ -36,7 +36,8 @@ class GCMMessageCryptographer {
// unique content encryption key for a given message.
static const size_t kSaltSize;
- GCMMessageCryptographer();
+ GCMMessageCryptographer(const base::StringPiece& local_public_key,
+ const base::StringPiece& peer_public_key);
~GCMMessageCryptographer();
// Encrypts |plaintext| using the |key| and the |salt|, both of which must be
@@ -83,6 +84,12 @@ class GCMMessageCryptographer {
// Derives the nonce from |key| and |salt|.
std::string DeriveNonce(const base::StringPiece& key,
const base::StringPiece& salt) const;
+
+ // The context. TODO: Better comment.
+ std::string nonce_info_;
+ std::string content_encryption_key_info_;
+
+ std::string context_;
};
} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698