![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Verifies signatures on incoming webhooks using OpenSSL. More...
#include <signature_verifier.h>
Public Member Functions | |
signature_verifier () | |
Constructor initializes the OpenSSL context and public key buffer. More... | |
bool | verify_signature (const std::string ×tamp, const std::string &body, const std::string &signature, const std::string &public_key_hex) |
Verifies the signature with the provided public key, timestamp, body, and signature. More... | |
Verifies signatures on incoming webhooks using OpenSSL.
dpp::signature_verifier::signature_verifier | ( | ) |
Constructor initializes the OpenSSL context and public key buffer.
bool dpp::signature_verifier::verify_signature | ( | const std::string & | timestamp, |
const std::string & | body, | ||
const std::string & | signature, | ||
const std::string & | public_key_hex | ||
) |
Verifies the signature with the provided public key, timestamp, body, and signature.
timestamp | The timestamp of the request |
body | The body of the request |
signature | The hex-encoded signature to verify |
public_key_hex | The hex-encoded public key |