TLA Line data Source code
1 : //
2 : // Copyright (c) 2025 Vinnie Falco (vinnie.falco@gmail.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/cppalliance/http
8 : //
9 :
10 : #include <boost/http/bcrypt.hpp>
11 :
12 : namespace boost {
13 : namespace http {
14 : namespace bcrypt {
15 : namespace detail {
16 :
17 : const char*
18 MIS 0 : error_cat_type::
19 : name() const noexcept
20 : {
21 0 : return "boost.http.bcrypt";
22 : }
23 :
24 : std::string
25 HIT 4 : error_cat_type::
26 : message(int ev) const
27 : {
28 4 : switch(static_cast<error>(ev))
29 : {
30 MIS 0 : case error::ok: return "success";
31 HIT 3 : case error::invalid_salt: return "invalid salt";
32 9 : case error::invalid_hash: return "invalid hash";
33 MIS 0 : default:
34 0 : return "unknown";
35 : }
36 : }
37 :
38 : #if defined(__cpp_constinit) && __cpp_constinit >= 201907L
39 : constinit error_cat_type error_cat;
40 : #else
41 : error_cat_type error_cat;
42 : #endif
43 :
44 : } // detail
45 : } // bcrypt
46 : } // http
47 : } // boost
|