PcapPlusPlus  Next
pcpp::X509Key Class Reference

#include <X509Decoder.h>

Public Member Functions

 X509Key (const std::vector< uint8_t > &key)
 
std::string toString (const std::string &delimiter=":") const
 
const std::vector< uint8_t > & getBytes () const
 

Detailed Description

Represents a key in an X.509 certificate

Constructor & Destructor Documentation

◆ X509Key()

pcpp::X509Key::X509Key ( const std::vector< uint8_t > &  key)
inlineexplicit

Constructs an X509Key from a byte vector

Parameters
[in]keyThe key data as a vector of bytes

Member Function Documentation

◆ getBytes()

const std::vector<uint8_t>& pcpp::X509Key::getBytes ( ) const

Gets the raw key bytes

Returns
A const reference to the vector containing the key bytes

◆ toString()

std::string pcpp::X509Key::toString ( const std::string &  delimiter = ":") const

Converts the key to a formatted string

Parameters
[in]delimiterThe delimiter to use between the bytes (default: ":")
Returns
A formatted string representation of the key