Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SkyFire::Impl::GenericHash< HashCreator, DigestLength > Class Template Reference

#include <CryptoHash.h>

Public Types

using Digest = std::array<uint8, DIGEST_LENGTH>

Public Member Functions

void Finalize ()
 GenericHash ()
Digest const & GetDigest () const
void UpdateData (char const *str)
template<typename Container>
void UpdateData (Container const &c)
void UpdateData (std::string const &str)
void UpdateData (std::string_view str)
void UpdateData (uint8 const *data, size_t len)
 ~GenericHash ()

Static Public Member Functions

template<typename... Ts>
static auto GetDigestOf (Ts &&... pack) -> std::enable_if_t<!(std::is_integral_v< std::decay_t< Ts > >||...), Digest >
static Digest GetDigestOf (uint8 const *data, size_t len)

Static Public Attributes

static constexpr size_t DIGEST_LENGTH = DigestLength

Private Attributes

EVP_MD_CTX * _ctx
Digest _digest = { }

Detailed Description

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
class SkyFire::Impl::GenericHash< HashCreator, DigestLength >

Definition at line 35 of file CryptoHash.h.

Member Typedef Documentation

◆ Digest

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
using SkyFire::Impl::GenericHash< HashCreator, DigestLength >::Digest = std::array<uint8, DIGEST_LENGTH>

Definition at line 39 of file CryptoHash.h.

Constructor & Destructor Documentation

◆ GenericHash()

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
SkyFire::Impl::GenericHash< HashCreator, DigestLength >::GenericHash ( )
inline

Definition at line 58 of file CryptoHash.h.

◆ ~GenericHash()

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
SkyFire::Impl::GenericHash< HashCreator, DigestLength >::~GenericHash ( )
inline

Definition at line 64 of file CryptoHash.h.

Member Function Documentation

◆ Finalize()

◆ GetDigest()

◆ GetDigestOf() [1/2]

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
template<typename... Ts>
auto SkyFire::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf ( Ts &&... pack) -> std::enable_if_t<!(std::is_integral_v< std::decay_t< Ts > >||...), Digest >
inlinestatic

Definition at line 50 of file CryptoHash.h.

◆ GetDigestOf() [2/2]

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
Digest SkyFire::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf ( uint8 const * data,
size_t len )
inlinestatic

Definition at line 41 of file CryptoHash.h.

◆ UpdateData() [1/5]

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
void SkyFire::Impl::GenericHash< HashCreator, DigestLength >::UpdateData ( char const * str)
inline

◆ UpdateData() [2/5]

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
template<typename Container>
void SkyFire::Impl::GenericHash< HashCreator, DigestLength >::UpdateData ( Container const & c)
inline

◆ UpdateData() [3/5]

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
void SkyFire::Impl::GenericHash< HashCreator, DigestLength >::UpdateData ( std::string const & str)
inline

◆ UpdateData() [4/5]

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
void SkyFire::Impl::GenericHash< HashCreator, DigestLength >::UpdateData ( std::string_view str)
inline

◆ UpdateData() [5/5]

Member Data Documentation

◆ _ctx

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
EVP_MD_CTX* SkyFire::Impl::GenericHash< HashCreator, DigestLength >::_ctx
private

Definition at line 96 of file CryptoHash.h.

◆ _digest

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
Digest SkyFire::Impl::GenericHash< HashCreator, DigestLength >::_digest = { }
private

Definition at line 97 of file CryptoHash.h.

◆ DIGEST_LENGTH

template<GenericHashImpl::HashCreator HashCreator, size_t DigestLength>
size_t SkyFire::Impl::GenericHash< HashCreator, DigestLength >::DIGEST_LENGTH = DigestLength
staticconstexpr

Definition at line 38 of file CryptoHash.h.


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