PcapPlusPlus  Next
pcpp::X509Algorithm Class Reference

#include <X509Decoder.h>

Public Types

enum  Value : uint8_t {
  SHA1 , SHA256 , SHA384 , SHA512 ,
  MD5 , RSA , RSAWithSHA1 , RSAWithSHA256 ,
  RSAWithSHA384 , RSAWithSHA512 , RSAPSS , ECDSA ,
  ECDSAWithSHA1 , ECDSAWithSHA256 , ECDSAWithSHA384 , ECDSAWithSHA512 ,
  DSA , DSAWithSHA1 , DSAWithSHA256 , ED25519 ,
  ED448 , DiffieHellman , Unknown
}
 Define enum types and the corresponding int values. More...
 

Public Member Functions

constexpr X509Algorithm (Value value)
 
std::string toString () const
 
std::string getOidValue () const
 

Static Public Member Functions

static X509Algorithm fromOidValue (const Asn1ObjectIdentifier &value)
 

Detailed Description

Represents cryptographic algorithms used in X.509 certificates This class encapsulates various hashing and signature algorithms that can be used in X.509 certificates for signing and key exchange.

Member Enumeration Documentation

◆ Value

Define enum types and the corresponding int values.

Enumerator
SHA1 

SHA-1 hashing algorithm.

SHA256 

SHA-256 hashing algorithm.

SHA384 

SHA-384 hashing algorithm.

SHA512 

SHA-512 hashing algorithm.

MD5 

MD5 hashing algorithm (considered cryptographically broken)

RSA 

RSA encryption/signature algorithm.

RSAWithSHA1 

RSA with SHA-1 signature algorithm.

RSAWithSHA256 

RSA with SHA-256 signature algorithm.

RSAWithSHA384 

RSA with SHA-384 signature algorithm.

RSAWithSHA512 

RSA with SHA-512 signature algorithm.

RSAPSS 

RSA Probabilistic Signature Scheme (PSS)

ECDSA 

Elliptic Curve Digital Signature Algorithm.

ECDSAWithSHA1 

ECDSA with SHA-1 signature algorithm.

ECDSAWithSHA256 

ECDSA with SHA-256 signature algorithm.

ECDSAWithSHA384 

ECDSA with SHA-384 signature algorithm.

ECDSAWithSHA512 

ECDSA with SHA-512 signature algorithm.

DSA 

Digital Signature Algorithm.

DSAWithSHA1 

DSA with SHA-1 signature algorithm.

DSAWithSHA256 

DSA with SHA-256 signature algorithm.

ED25519 

EdDSA using Curve25519 (Ed25519)

ED448 

EdDSA using Curve448 (Ed448)

DiffieHellman 

Diffie-Hellman key exchange algorithm.

Unknown 

Unknown or unsupported algorithm.

Constructor & Destructor Documentation

◆ X509Algorithm()

constexpr pcpp::X509Algorithm::X509Algorithm ( Value  value)
inlineconstexpr

Construct LdapOperationType from Value enum

Parameters
[in]valuethe operation type enum value

Member Function Documentation

◆ fromOidValue()

static X509Algorithm pcpp::X509Algorithm::fromOidValue ( const Asn1ObjectIdentifier value)
static

A static method that creates LdapOperationType from an integer value

Parameters
[in]valueThe operation type integer value
Returns
The operation type that corresponds to the integer value. If the integer value doesn't correspond to any operation type, LdapOperationType::Unknown is returned

◆ getOidValue()

std::string pcpp::X509Algorithm::getOidValue ( ) const
Returns
The OID value of the operation type

◆ toString()

std::string pcpp::X509Algorithm::toString ( ) const
Returns
A string representation of the operation type