TrinityCore
Trinity::Crypto::Ed25519 Class Reference

#include <Ed25519.h>

Public Member Functions

 Ed25519 ()
 
 Ed25519 (Ed25519 const &right)
 
 Ed25519 (Ed25519 &&right) noexcept
 
 ~Ed25519 ()
 
Ed25519operator= (Ed25519 const &right)
 
Ed25519operator= (Ed25519 &&right) noexcept
 
bool LoadFromFile (std::string const &fileName)
 
bool LoadFromString (std::string const &keyPem)
 
bool LoadFromByteArray (std::array< uint8, 32 > const &keyBytes)
 
template<std::size_t N>
bool Sign (std::array< uint8, N > const &message, std::vector< uint8 > &output)
 
bool Sign (uint8 const *message, std::size_t messageLength, std::vector< uint8 > &output)
 
template<std::size_t N>
bool SignWithContext (std::array< uint8, N > const &message, std::vector< uint8 > const &context, std::vector< uint8 > &output)
 
bool SignWithContext (uint8 const *message, std::size_t messageLength, std::vector< uint8 > const &context, std::vector< uint8 > &output)
 

Private Attributes

EVP_PKEY * _key = nullptr
 

Detailed Description

Definition at line 31 of file Ed25519.h.

Constructor & Destructor Documentation

◆ Ed25519() [1/3]

Trinity::Crypto::Ed25519::Ed25519 ( )
default

◆ Ed25519() [2/3]

Trinity::Crypto::Ed25519::Ed25519 ( Ed25519 const &  right)

Definition at line 29 of file Ed25519.cpp.

◆ Ed25519() [3/3]

Trinity::Crypto::Ed25519::Ed25519 ( Ed25519 &&  right)
noexcept

Definition at line 34 of file Ed25519.cpp.

◆ ~Ed25519()

Trinity::Crypto::Ed25519::~Ed25519 ( )

Definition at line 39 of file Ed25519.cpp.

Member Function Documentation

◆ LoadFromByteArray()

bool Trinity::Crypto::Ed25519::LoadFromByteArray ( std::array< uint8, 32 > const &  keyBytes)

Definition at line 103 of file Ed25519.cpp.

◆ LoadFromFile()

bool Trinity::Crypto::Ed25519::LoadFromFile ( std::string const &  fileName)

Definition at line 63 of file Ed25519.cpp.

+ Here is the call graph for this function:

◆ LoadFromString()

bool Trinity::Crypto::Ed25519::LoadFromString ( std::string const &  keyPem)

Definition at line 82 of file Ed25519.cpp.

+ Here is the call graph for this function:

◆ operator=() [1/2]

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

Definition at line 54 of file Ed25519.cpp.

◆ operator=() [2/2]

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

Definition at line 44 of file Ed25519.cpp.

◆ Sign() [1/2]

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

Definition at line 49 of file Ed25519.h.

◆ Sign() [2/2]

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

Definition at line 118 of file Ed25519.cpp.

◆ SignWithContext() [1/2]

template<std::size_t N>
bool Trinity::Crypto::Ed25519::SignWithContext ( std::array< uint8, N > const &  message,
std::vector< uint8 > const &  context,
std::vector< uint8 > &  output 
)
inline

Definition at line 57 of file Ed25519.h.

◆ SignWithContext() [2/2]

bool Trinity::Crypto::Ed25519::SignWithContext ( uint8 const *  message,
std::size_t  messageLength,
std::vector< uint8 > const &  context,
std::vector< uint8 > &  output 
)

Definition at line 135 of file Ed25519.cpp.

Member Data Documentation

◆ _key

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

Definition at line 65 of file Ed25519.h.


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