OLD | NEW |
---|---|
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 Loading... | |
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_ |
OLD | NEW |