| 1 | // |
|---|---|
| 2 | // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) |
| 3 | // |
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | // |
| 7 | // Official repository: https://github.com/boostorg/beast |
| 8 | // |
| 9 | |
| 10 | #ifndef BOOST_BEAST_WEBSOCKET_DETAIL_HYBI13_HPP |
| 11 | #define BOOST_BEAST_WEBSOCKET_DETAIL_HYBI13_HPP |
| 12 | |
| 13 | #include <boost/beast/core/static_string.hpp> |
| 14 | #include <boost/beast/core/string.hpp> |
| 15 | #include <boost/beast/core/detail/base64.hpp> |
| 16 | #include <cstdint> |
| 17 | |
| 18 | namespace boost { |
| 19 | namespace beast { |
| 20 | namespace websocket { |
| 21 | namespace detail { |
| 22 | |
| 23 | using sec_ws_key_type = static_string< |
| 24 | beast::detail::base64::encoded_size(n: 16)>; |
| 25 | |
| 26 | using sec_ws_accept_type = static_string< |
| 27 | beast::detail::base64::encoded_size(n: 20)>; |
| 28 | |
| 29 | BOOST_BEAST_DECL |
| 30 | void |
| 31 | make_sec_ws_key(sec_ws_key_type& key); |
| 32 | |
| 33 | BOOST_BEAST_DECL |
| 34 | void |
| 35 | make_sec_ws_accept( |
| 36 | sec_ws_accept_type& accept, |
| 37 | string_view key); |
| 38 | |
| 39 | } // detail |
| 40 | } // websocket |
| 41 | } // beast |
| 42 | } // boost |
| 43 | |
| 44 | #if BOOST_BEAST_HEADER_ONLY |
| 45 | #include <boost/beast/websocket/detail/hybi13.ipp> |
| 46 | #endif |
| 47 | |
| 48 | #endif |
| 49 |
