userver: crypto::PrivateKey Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts

#include <userver/crypto/private_key.hpp>

Public Types

using NativeType = EVP_PKEY
 

Public Member Functions

NativeType * GetNative () const noexcept
 
 operator bool () const noexcept
 

Static Public Member Functions

static PrivateKey LoadFromString (std::string_view key, std::string_view password)
 
static PrivateKey LoadFromString (std::string_view key)
 

Detailed Description

Loaded into memory private key

Definition at line 18 of file private_key.hpp.

Member Typedef Documentation

◆ NativeType

using crypto::PrivateKey::NativeType = EVP_PKEY

Definition at line 20 of file private_key.hpp.

Member Function Documentation

◆ GetNative()

NativeType * crypto::PrivateKey::GetNative ( ) const
inlinenoexcept

Definition at line 24 of file private_key.hpp.

◆ LoadFromString() [1/2]

static PrivateKey crypto::PrivateKey::LoadFromString ( std::string_view  key)
static

Accepts a string that contains a private key (not protected with password), checks the key and password, loads it into OpenSSL structures and returns as a PrivateKey variable.

Exceptions
crypto::KeyParseErrorif failed to load the key.

◆ LoadFromString() [2/2]

static PrivateKey crypto::PrivateKey::LoadFromString ( std::string_view  key,
std::string_view  password 
)
static

Accepts a string that contains a private key and a password, checks the key and password, loads it into OpenSSL structures and returns as a PrivateKey variable.

Exceptions
crypto::KeyParseErrorif failed to load the key.

◆ operator bool()

crypto::PrivateKey::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 25 of file private_key.hpp.


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