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

Side by Side Diff: components/proximity_auth/cryptauth/base64url.h

Issue 1063323002: Move base64url.* to CryptAuth component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cryptauth_refactor
Patch Set: rename path in chrome/browser/chromeos Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PROXIMITY_BASE64URL_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_BASE64URL_H
6 #define COMPONENTS_PROXIMITY_BASE64URL_H 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_BASE64URL_H
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace proximity_auth { 10 namespace proximity_auth {
11 11
12 // An implmentation of the base64url encoding. Escapes the unsafe '+' and '/' 12 // An implmentation of the base64url encoding. Escapes the unsafe '+' and '/'
13 // characters with the url-safe alternatives '-' and '_', respectively. For more 13 // characters with the url-safe alternatives '-' and '_', respectively. For more
14 // info, see the section on "Base 64 Encoding with URL and Filename Safe 14 // info, see the section on "Base 64 Encoding with URL and Filename Safe
15 // Alphabet" in http://www.ietf.org/rfc/rfc4648.txt 15 // Alphabet" in http://www.ietf.org/rfc/rfc4648.txt
16 // NOTE: Unlike many common web-safe encodings, this function does not escape 16 // NOTE: Unlike many common web-safe encodings, this function does not escape
17 // the '=' character. This is to match the expectations set by Android. 17 // the '=' character. This is to match the expectations set by Android.
18 // TODO(isherman): There are several (semantically slightly different) 18 // TODO(isherman): There are several (semantically slightly different)
19 // implementations of this within the Chromium codebase. Try to unify them. 19 // implementations of this within the Chromium codebase. Try to unify them.
20 void Base64UrlEncode(const std::string& decoded_input, 20 void Base64UrlEncode(const std::string& decoded_input,
21 std::string* encoded_output); 21 std::string* encoded_output);
22 22
23 // The inverse operation for the base64url encoding above. 23 // The inverse operation for the base64url encoding above.
24 bool Base64UrlDecode(const std::string& encoded_input, 24 bool Base64UrlDecode(const std::string& encoded_input,
25 std::string* decoded_output); 25 std::string* decoded_output);
26 26
27 } // namespace proximity_auth 27 } // namespace proximity_auth
28 28
29 #endif // COMPONENTS_PROXIMITY_BASE64URL_H 29 #endif // COMPONENTS_PROXIMITY_BASE64URL_H
OLDNEW
« no previous file with comments | « components/proximity_auth/cryptauth/BUILD.gn ('k') | components/proximity_auth/cryptauth/base64url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698