JWT-CPP v0.7.0
A header only library for creating and validating JSON Web Tokens (JWT) in C++
Loading...
Searching...
No Matches
jwt::algorithm::rs256 Struct Reference

#include <jwt.h>

Inheritance diagram for jwt::algorithm::rs256:
[legend]

Public Member Functions

 rs256 (const std::string &public_key, const std::string &private_key="", const std::string &public_key_password="", const std::string &private_key_password="")
 Construct new instance of algorithm.
 
- Public Member Functions inherited from jwt::algorithm::rsa
 rsa (const std::string &public_key, const std::string &private_key, const std::string &public_key_password, const std::string &private_key_password, const EVP_MD *(*md)(), std::string name)
 
std::string sign (const std::string &data, std::error_code &ec) const
 
void verify (const std::string &data, const std::string &signature, std::error_code &ec) const
 
std::string name () const
 

Detailed Description

RS256 algorithm.

This data structure is used to describe the RSA256 and can be used to verify JWTs

Constructor & Destructor Documentation

◆ rs256()

jwt::algorithm::rs256::rs256 ( const std::string & public_key,
const std::string & private_key = "",
const std::string & public_key_password = "",
const std::string & private_key_password = "" )
inlineexplicit

Construct new instance of algorithm.

Parameters
public_keyRSA public key in PEM format
private_keyRSA private key or empty string if not available. If empty, signing will always fail.
public_key_passwordPassword to decrypt public key pem.
private_key_passwordPassword to decrypt private key pem.

The documentation for this struct was generated from the following file: