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

Handle class for EVP_PKEY structures. More...

#include <jwt.h>

Public Member Functions

constexpr evp_pkey_handle () noexcept=default
 Creates a null key pointer.
 
constexpr evp_pkey_handle (EVP_PKEY *key) noexcept
 Construct a new handle. The handle takes ownership of the key.
 
 evp_pkey_handle (const evp_pkey_handle &other)
 
 evp_pkey_handle (evp_pkey_handle &&other) noexcept
 
evp_pkey_handleoperator= (const evp_pkey_handle &other)
 
evp_pkey_handleoperator= (evp_pkey_handle &&other) noexcept
 
evp_pkey_handleoperator= (EVP_PKEY *key)
 
EVP_PKEY * get () const noexcept
 
bool operator! () const noexcept
 
 operator bool () const noexcept
 

Detailed Description

Handle class for EVP_PKEY structures.

Starting from OpenSSL 1.1.0, EVP_PKEY has internal reference counting. This handle class allows jwt-cpp to leverage that and thus safe an allocation for the control block in std::shared_ptr. The handle uses shared_ptr as a fallback on older versions. The behaviour should be identical between both.

Constructor & Destructor Documentation

◆ evp_pkey_handle()

constexpr jwt::helper::evp_pkey_handle::evp_pkey_handle ( EVP_PKEY * key)
inlineexplicitconstexprnoexcept

Construct a new handle. The handle takes ownership of the key.

Parameters
keyThe key to store

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