Created
August 20, 2013 10:59
-
-
Save nico159/6280040 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BOOST_NETWORK_UTILS_BASE64_HPP_20130820 | |
#define BOOST_NETWORK_UTILS_BASE64_HPP_20130820 | |
// Copyright 2010 Dean Michael Berris. | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt) | |
namespace boost { namespace network { namespace utils { | |
struct base64 { | |
/** decodes base64-encoded strings | |
* | |
* @param input base64 encoded string | |
* @param output decoded string ( may include non-text chars) | |
* @return true if successful, false if input string contains non-base64 symbols | |
*/ | |
template <typename InputIt, typename OutputIt> | |
static InputIt encode(InputIt begin, InputIt end, OutputIt destination); | |
/** encodes strings using base64 | |
* | |
* @param input arbitrary string ( may include non-text chars) | |
* @param output base64 encoded string | |
* @return true if successful | |
*/ | |
template <typename InputIt, typename OutputIt> | |
static InputIt decode(InputIt begin, InputIt end, OutputIt destination); | |
}; | |
} /* utils */ | |
} /* network */ | |
} /* boost */ | |
// import implementation file | |
#include <boost/network/utils/impl/base64.ipp> | |
#endif /* BOOST_NETWORK_UTILS_BASE64_HPP_20130820 */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment