10 #ifndef BOOST_BEAST_WEBSOCKET_DETAIL_HYBI13_HPP 11 #define BOOST_BEAST_WEBSOCKET_DETAIL_HYBI13_HPP 17 #include <boost/assert.hpp> 21 #include <type_traits> 39 for(
int i = 0; i < 16; i += 4)
43 a[i+1] = (v >> 8) & 0xff;
44 a[i+2] = (v >> 16) & 0xff;
45 a[i+3] = (v >> 24) & 0xff;
49 key.
data(), &a[0], 16));
52 template<
class =
void>
59 m.append(
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");
67 accept.
data(), &digest[0],
sizeof(digest)));
void init(sha1_context &ctx) noexcept
Definition: sha1.hpp:235
Definition: async_result.hpp:20
size_type constexpr max_size() const
Returns the maximum number of characters that can be stored, excluding the null terminator.
Definition: static_string.hpp:470
static std::size_t constexpr max_size_n
Maximum size of the string excluding the null terminator.
Definition: static_string.hpp:87
void finish(sha1_context &ctx, void *digest) noexcept
Definition: sha1.hpp:273
std::size_t constexpr encoded_size(std::size_t n)
Returns max chars needed to encode a base64 string.
Definition: base64.hpp:92
void update(sha1_context &ctx, void const *message, std::size_t size) noexcept
Definition: sha1.hpp:248
void resize(std::size_t n)
Definition: static_string.ipp:461
std::size_t encode(void *dest, void const *src, std::size_t len)
Definition: base64.hpp:120
boost::string_ref string_view
The type of string view used by the library.
Definition: string.hpp:36
void make_sec_ws_key(sec_ws_key_type &key, Gen &g)
Definition: hybi13.hpp:36
Definition: static_string.hpp:44
static unsigned int constexpr digest_size
Definition: sha1.hpp:225
CharT * data()
Returns a pointer to the first character of a string.
Definition: static_string.hpp:329
static_string< beast::detail::base64::encoded_size(16)> sec_ws_key_type
Definition: hybi13.hpp:29
void make_sec_ws_accept(sec_ws_accept_type &accept, string_view key)
Definition: hybi13.hpp:54