PcapPlusPlus
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 ()
 
std::string asString ()
 
SSLKeyExchangeAlgorithm getKeyExchangeAlg ()
 
SSLAuthenticationAlgorithm getAuthAlg ()
 
SSLSymetricEncryptionAlgorithm getSymKeyAlg ()
 
SSLHashingAlgorithm getMACAlg ()
 

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 ( )
inline
Returns
String representation of this cipher-suite

◆ getAuthAlg()

SSLAuthenticationAlgorithm pcpp::SSLCipherSuite::getAuthAlg ( )
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 ( )
inline
Returns
Cipher-suite ID

◆ getKeyExchangeAlg()

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

◆ getMACAlg()

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

◆ getSymKeyAlg()

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