license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 1 | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 4 | |
[email protected] | 978df34 | 2009-11-24 06:21:53 | [diff] [blame] | 5 | #ifndef BASE_BASE64_H__ |
6 | #define BASE_BASE64_H__ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 8 | |
9 | #include <string> | ||||
10 | |||||
[email protected] | 978df34 | 2009-11-24 06:21:53 | [diff] [blame] | 11 | namespace base { |
[email protected] | a9bb6f69 | 2008-07-30 16:40:10 | [diff] [blame] | 12 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 13 | // Encodes the input string in base64. Returns true if successful and false |
14 | // otherwise. The output string is only modified if successful. | ||||
15 | bool Base64Encode(const std::string& input, std::string* output); | ||||
16 | |||||
17 | // Decodes the base64 input string. Returns true if successful and false | ||||
18 | // otherwise. The output string is only modified if successful. | ||||
19 | bool Base64Decode(const std::string& input, std::string* output); | ||||
20 | |||||
[email protected] | 978df34 | 2009-11-24 06:21:53 | [diff] [blame] | 21 | } // namespace base |
[email protected] | a9bb6f69 | 2008-07-30 16:40:10 | [diff] [blame] | 22 | |
[email protected] | 978df34 | 2009-11-24 06:21:53 | [diff] [blame] | 23 | #endif // BASE_BASE64_H__ |