PcapPlusPlus  21.05
pcpp::SSLCipherSuite Class Reference

#include <SSLHandshake.h>

Public Member Functions

 SSLCipherSuite (uint16_t id, SSLKeyExchangeAlgorithm keyExAlg, SSLAuthenticationAlgorithm authAlg, SSLSymetricEncryptionAlgorithm symKeyAlg, SSLHashingAlgorithm MACAlg, const char *name)
 
uint16_t getID () const
 
std::string asString () const
 
SSLKeyExchangeAlgorithm getKeyExchangeAlg () const
 
SSLAuthenticationAlgorithm getAuthAlg () const
 
SSLSymetricEncryptionAlgorithm getSymKeyAlg () const
 
SSLHashingAlgorithm getMACAlg () const
 

Static Public Member Functions

static SSLCipherSuitegetCipherSuiteByID (uint16_t id)
 
static SSLCipherSuitegetCipherSuiteByName (std::string name)
 

Detailed Description

Represents a cipher-suite and enables access all information about it such as all algorithms it encapsulates, its ID (as appears in the client-hello or server-hello messages), its name (e.g "TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA") etc. PcapPlusPlus contains static instances of this type for all known cipher-suites and enables access to them through name or ID (see getCipherSuiteByID() and getCipherSuiteByName() ). List of cipher-suite was taken from here: http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml

Constructor & Destructor Documentation

◆ SSLCipherSuite()

pcpp::SSLCipherSuite::SSLCipherSuite ( uint16_t  id,
SSLKeyExchangeAlgorithm  keyExAlg,
SSLAuthenticationAlgorithm  authAlg,
SSLSymetricEncryptionAlgorithm  symKeyAlg,
SSLHashingAlgorithm  MACAlg,
const char *  name 
)
inline

A c'tor for this class, should never be used by a user

Parameters
[in]idCipher-suite ID
[in]keyExAlgKey-exchange algorithm used in this cipher-suite
[in]authAlgAuthentication algorithm used in this cipher-suite
[in]symKeyAlgSymmetric key algorithm used in this cipher-suite
[in]MACAlgMAC algorithm used in this cipher-suite
[in]nameString representation of this cipher-suite

Member Function Documentation

◆ asString()

std::string pcpp::SSLCipherSuite::asString ( ) const
inline
Returns
String representation of this cipher-suite

◆ getAuthAlg()

SSLAuthenticationAlgorithm pcpp::SSLCipherSuite::getAuthAlg ( ) const
inline
Returns
Authentication algorithm used in this cipher-suite

◆ getCipherSuiteByID()

static SSLCipherSuite* pcpp::SSLCipherSuite::getCipherSuiteByID ( uint16_t  id)
static

A static method that returns a cipher-suite instance by ID

Parameters
[in]idCipher-suite ID
Returns
A cipher-suite instance matching this ID or NULL if ID not found

◆ getCipherSuiteByName()

static SSLCipherSuite* pcpp::SSLCipherSuite::getCipherSuiteByName ( std::string  name)
static

A static method that returns a cipher-suite instance by name

Parameters
[in]nameCipher-suite name (e.g "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA")
Returns
A cipher-suite instance matching this name or NULL if name not found

◆ getID()

uint16_t pcpp::SSLCipherSuite::getID ( ) const
inline
Returns
Cipher-suite ID

◆ getKeyExchangeAlg()

SSLKeyExchangeAlgorithm pcpp::SSLCipherSuite::getKeyExchangeAlg ( ) const
inline
Returns
Key-exchange algorithm used in this cipher-suite

◆ getMACAlg()

SSLHashingAlgorithm pcpp::SSLCipherSuite::getMACAlg ( ) const
inline
Returns
MAC algorithm used in this cipher-suite

◆ getSymKeyAlg()

SSLSymetricEncryptionAlgorithm pcpp::SSLCipherSuite::getSymKeyAlg ( ) const
inline
Returns
Symmetric key algorithm used in this cipher-suite