Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:39

0001 //
0002 // Copyright (c) 2019-2023 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #ifndef BOOST_MYSQL_IMPL_INTERNAL_AUTH_AUTH_HPP
0009 #define BOOST_MYSQL_IMPL_INTERNAL_AUTH_AUTH_HPP
0010 
0011 #include <boost/mysql/error_code.hpp>
0012 #include <boost/mysql/string_view.hpp>
0013 
0014 #include <boost/mysql/detail/config.hpp>
0015 
0016 #include <boost/core/span.hpp>
0017 
0018 #include <vector>
0019 
0020 namespace boost {
0021 namespace mysql {
0022 namespace detail {
0023 
0024 struct auth_response
0025 {
0026     std::vector<std::uint8_t> data;
0027     string_view plugin_name;
0028 };
0029 
0030 BOOST_ATTRIBUTE_NODISCARD
0031 BOOST_MYSQL_DECL
0032 error_code compute_auth_response(
0033     string_view plugin_name,
0034     string_view password,
0035     span<const std::uint8_t> challenge,
0036     bool use_ssl,
0037     auth_response& output
0038 );
0039 
0040 }  // namespace detail
0041 }  // namespace mysql
0042 }  // namespace boost
0043 
0044 #ifdef BOOST_MYSQL_HEADER_ONLY
0045 #include <boost/mysql/impl/internal/auth/auth.ipp>
0046 #endif
0047 
0048 #endif