diff --git a/websocketpp/base64/base64.hpp b/websocketpp/base64/base64.hpp index ec4b3ad88f..2fed34228d 100644 --- a/websocketpp/base64/base64.hpp +++ b/websocketpp/base64/base64.hpp @@ -50,6 +50,10 @@ static inline bool is_base64(unsigned char c) { (c >= 97 && c <= 122)); // a-z } +inline std::string base64_encode(const std::string & data) { + return base64_encode(data.data(),data.size()); +} + inline std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) { @@ -145,4 +149,4 @@ inline std::string base64_decode(std::string const& encoded_string) { return ret; } -#endif // _BASE64_HPP_ \ No newline at end of file +#endif // _BASE64_HPP_