|
cxxmcp 1.1.6
C++ MCP SDK
|
Constant-time comparison helpers for auth secrets and lookup keys. More...
#include <cstddef>#include <string_view>Go to the source code of this file.
Functions | |
| bool | mcp::auth::constant_time_string_equal (std::string_view lhs, std::string_view rhs) noexcept |
| Compare two strings without data-dependent early exit. | |
Constant-time comparison helpers for auth secrets and lookup keys.
|
inlinenoexcept |
Compare two strings without data-dependent early exit.
The loop covers the longer input so equal-prefix mismatches and length mismatches do not return early through std::string::operator==.