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

Side by Side Diff: components/gcm_driver/crypto/encryption_header_parsers.h

Issue 1243563002: Teach the GCM Driver how to decrypt incoming messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-push-keys
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_GCM_DRIVER_CRYPTO_ENCRYPTION_HEADER_PARSERS_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_CRYPTO_ENCRYPTION_HEADER_PARSERS_H_
6 #define COMPONENTS_GCM_DRIVER_CRYPTO_ENCRYPTION_HEADER_PARSERS_H_ 6 #define COMPONENTS_GCM_DRIVER_CRYPTO_ENCRYPTION_HEADER_PARSERS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 // Parses |input| following the syntax of the Encryption HTTP header. Returns 31 // Parses |input| following the syntax of the Encryption HTTP header. Returns
32 // whether the |input| could be parsed into |result| successfully. 32 // whether the |input| could be parsed into |result| successfully.
33 bool ParseEncryptionHeader(const std::string& input, 33 bool ParseEncryptionHeader(const std::string& input,
34 std::vector<EncryptionHeaderValue>* result); 34 std::vector<EncryptionHeaderValue>* result);
35 35
36 // Parses |input| following the syntax of the Encryption-Key HTTP header. 36 // Parses |input| following the syntax of the Encryption-Key HTTP header.
37 // Returns whether the |input| could be parsed into |result| successfully. 37 // Returns whether the |input| could be parsed into |result| successfully.
38 bool ParseEncryptionKeyHeader(const std::string& input, 38 bool ParseEncryptionKeyHeader(const std::string& input,
39 std::vector<EncryptionKeyHeaderValue>* result); 39 std::vector<EncryptionKeyHeaderValue>* result);
40 40
41 // Decodes |input| as a base64url string into |output|.
jianli 2015/08/04 00:49:30 Please also comment on the returned boolean value.
Peter Beverloo 2015/09/25 16:37:35 This doesn't apply anymore.
42 bool Base64DecodeUrlSafe(const std::string& input, std::string* output);
43
41 } // namespace gcm 44 } // namespace gcm
42 45
43 #endif // COMPONENTS_GCM_DRIVER_CRYPTO_ENCRYPTION_HEADER_PARSERS_H_ 46 #endif // COMPONENTS_GCM_DRIVER_CRYPTO_ENCRYPTION_HEADER_PARSERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698