| OLD | NEW |
| 1 | 1 |
| 2 //********************************************************************* | 2 //********************************************************************* |
| 3 //* C_Base64 - a simple base64 encoder and decoder. | 3 //* C_Base64 - a simple base64 encoder and decoder. |
| 4 //* | 4 //* |
| 5 //* Copyright (c) 1999, Bob Withers - bwit@pobox.com | 5 //* Copyright (c) 1999, Bob Withers - bwit@pobox.com |
| 6 //* | 6 //* |
| 7 //* This code may be freely used for any purpose, either personal | 7 //* This code may be freely used for any purpose, either personal |
| 8 //* or commercial, provided the authors copyright notice remains | 8 //* or commercial, provided the authors copyright notice remains |
| 9 //* intact. | 9 //* intact. |
| 10 //********************************************************************* | 10 //********************************************************************* |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 size_t* data_used); | 76 size_t* data_used); |
| 77 | 77 |
| 78 // Convenience Methods | 78 // Convenience Methods |
| 79 static inline std::string Encode(const std::string& data) { | 79 static inline std::string Encode(const std::string& data) { |
| 80 std::string result; | 80 std::string result; |
| 81 EncodeFromArray(data.data(), data.size(), &result); | 81 EncodeFromArray(data.data(), data.size(), &result); |
| 82 return result; | 82 return result; |
| 83 } | 83 } |
| 84 static inline std::string Decode(const std::string& data, DecodeFlags flags) { | 84 static inline std::string Decode(const std::string& data, DecodeFlags flags) { |
| 85 std::string result; | 85 std::string result; |
| 86 DecodeFromArray(data.data(), data.size(), flags, &result, NULL); | 86 DecodeFromArray(data.data(), data.size(), flags, &result, nullptr); |
| 87 return result; | 87 return result; |
| 88 } | 88 } |
| 89 static inline bool Decode(const std::string& data, | 89 static inline bool Decode(const std::string& data, |
| 90 DecodeFlags flags, | 90 DecodeFlags flags, |
| 91 std::string* result, | 91 std::string* result, |
| 92 size_t* data_used) { | 92 size_t* data_used) { |
| 93 return DecodeFromArray(data.data(), data.size(), flags, result, data_used); | 93 return DecodeFromArray(data.data(), data.size(), flags, result, data_used); |
| 94 } | 94 } |
| 95 static inline bool Decode(const std::string& data, | 95 static inline bool Decode(const std::string& data, |
| 96 DecodeFlags flags, | 96 DecodeFlags flags, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 114 static bool DecodeFromArrayTemplate(const char* data, | 114 static bool DecodeFromArrayTemplate(const char* data, |
| 115 size_t len, | 115 size_t len, |
| 116 DecodeFlags flags, | 116 DecodeFlags flags, |
| 117 T* result, | 117 T* result, |
| 118 size_t* data_used); | 118 size_t* data_used); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace rtc | 121 } // namespace rtc |
| 122 | 122 |
| 123 #endif // WEBRTC_BASE_BASE64_H__ | 123 #endif // WEBRTC_BASE_BASE64_H__ |
| OLD | NEW |