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

Unified Diff: components/gcm_driver/crypto/gcm_crypto_test_helpers.cc

Issue 2713673002: Separate out the scheme from the GCMMessageCryptographer (Closed)
Patch Set: comments Created 3 years, 7 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 | components/gcm_driver/crypto/gcm_encryption_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/crypto/gcm_crypto_test_helpers.cc
diff --git a/components/gcm_driver/crypto/gcm_crypto_test_helpers.cc b/components/gcm_driver/crypto/gcm_crypto_test_helpers.cc
index b98084e2afe293983bf64439cdc30fdb78a1e695..ff405bfdcfd7de2e94217d757bf385dbed576472 100644
--- a/components/gcm_driver/crypto/gcm_crypto_test_helpers.cc
+++ b/components/gcm_driver/crypto/gcm_crypto_test_helpers.cc
@@ -44,13 +44,14 @@ bool CreateEncryptedPayloadForTesting(const base::StringPiece& payload,
const size_t salt_size = GCMMessageCryptographer::kSaltSize;
crypto::RandBytes(base::WriteInto(&salt, salt_size + 1), salt_size);
- GCMMessageCryptographer cryptographer(peer_public_key, public_key,
- auth_secret.as_string());
+ GCMMessageCryptographer cryptographer(
+ GCMMessageCryptographer::Version::DRAFT_03);
size_t record_size;
std::string ciphertext;
- if (!cryptographer.Encrypt(payload, shared_secret, salt, &record_size,
+ if (!cryptographer.Encrypt(peer_public_key, public_key, shared_secret,
+ auth_secret, salt, payload, &record_size,
&ciphertext)) {
return false;
}
« no previous file with comments | « no previous file | components/gcm_driver/crypto/gcm_encryption_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698