TrinityCore
Trinity::Crypto::RsaSignature Class Reference

#include <RSA.h>

Classes

class  DigestGenerator
 
class  HMAC_SHA256
 
class  SHA256
 

Public Member Functions

 RsaSignature ()
 
 RsaSignature (RsaSignature const &other)
 
 RsaSignature (RsaSignature &&other) noexcept
 
 ~RsaSignature ()
 
RsaSignatureoperator= (RsaSignature const &right)
 
RsaSignatureoperator= (RsaSignature &&right) noexcept
 
bool LoadKeyFromFile (std::string const &fileName)
 
bool LoadKeyFromString (std::string const &keyPem)
 
template<std::size_t N>
bool Sign (std::array< uint8, N > const &message, DigestGenerator &generator, std::vector< uint8 > &output)
 
bool Sign (uint8 const *message, std::size_t messageLength, DigestGenerator &generator, std::vector< uint8 > &output)
 

Private Attributes

EVP_MD_CTX * _ctx = nullptr
 
EVP_PKEY * _key = nullptr
 

Detailed Description

Definition at line 32 of file RSA.h.

Constructor & Destructor Documentation

◆ RsaSignature() [1/3]

Trinity::Crypto::RsaSignature::RsaSignature ( )

Definition at line 383 of file RSA.cpp.

◆ RsaSignature() [2/3]

Trinity::Crypto::RsaSignature::RsaSignature ( RsaSignature const &  other)

Definition at line 387 of file RSA.cpp.

◆ RsaSignature() [3/3]

Trinity::Crypto::RsaSignature::RsaSignature ( RsaSignature &&  other)
noexcept

Definition at line 392 of file RSA.cpp.

◆ ~RsaSignature()

Trinity::Crypto::RsaSignature::~RsaSignature ( )

Definition at line 397 of file RSA.cpp.

Member Function Documentation

◆ LoadKeyFromFile()

bool Trinity::Crypto::RsaSignature::LoadKeyFromFile ( std::string const &  fileName)

Definition at line 424 of file RSA.cpp.

+ Here is the call graph for this function:

◆ LoadKeyFromString()

bool Trinity::Crypto::RsaSignature::LoadKeyFromString ( std::string const &  keyPem)

Definition at line 443 of file RSA.cpp.

+ Here is the call graph for this function:

◆ operator=() [1/2]

RsaSignature & Trinity::Crypto::RsaSignature::operator= ( RsaSignature &&  right)
noexcept

Definition at line 414 of file RSA.cpp.

+ Here is the call graph for this function:

◆ operator=() [2/2]

RsaSignature & Trinity::Crypto::RsaSignature::operator= ( RsaSignature const &  right)

Definition at line 403 of file RSA.cpp.

◆ Sign() [1/2]

template<std::size_t N>
bool Trinity::Crypto::RsaSignature::Sign ( std::array< uint8, N > const &  message,
DigestGenerator generator,
std::vector< uint8 > &  output 
)
inline

Definition at line 99 of file RSA.h.

+ Here is the caller graph for this function:

◆ Sign() [2/2]

bool Trinity::Crypto::RsaSignature::Sign ( uint8 const *  message,
std::size_t  messageLength,
DigestGenerator generator,
std::vector< uint8 > &  output 
)

Definition at line 464 of file RSA.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _ctx

EVP_MD_CTX* Trinity::Crypto::RsaSignature::_ctx = nullptr
private

Definition at line 107 of file RSA.h.

◆ _key

EVP_PKEY* Trinity::Crypto::RsaSignature::_key = nullptr
private

Definition at line 108 of file RSA.h.


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