cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::auth::SecureString Class Reference

Small owning string wrapper that zeroizes stored bytes on reset and destruction. More...

#include <dpop.hpp>

Public Member Functions

 SecureString (const char *value)
 
 SecureString (std::string value)
 
 SecureString (std::string_view value)
 
 SecureString (const SecureString &)=default
 
SecureStringoperator= (const SecureString &)=default
 
 SecureString (SecureString &&other) noexcept
 
SecureStringoperator= (SecureString &&other) noexcept
 
SecureStringoperator= (std::string value)
 
void reset (std::string value={})
 
std::string_view view () const noexcept
 
const std::string & str () const noexcept
 
bool empty () const noexcept
 
std::size_t size () const noexcept
 

Detailed Description

Small owning string wrapper that zeroizes stored bytes on reset and destruction.

This is not a substitute for OS-backed locked memory, but it prevents SDK auth key material from being kept in an ordinary std::string field with no cleanup policy.


The documentation for this class was generated from the following file: