TrinityCore
Trinity::Crypto::Argon2 Struct Reference

#include <Argon2.h>

Static Public Member Functions

static Optional< std::string > Hash (std::string const &password, BigNumber const &salt, uint32 nIterations=DEFAULT_ITERATIONS, uint32 kibMemoryCost=DEFAULT_MEMORY_COST)
 
static bool Verify (std::string const &password, std::string const &hash)
 

Static Public Attributes

static constexpr uint32 HASH_LEN = 16
 
static constexpr uint32 ENCODED_HASH_LEN = 100
 
static constexpr uint32 DEFAULT_ITERATIONS = 10
 
static constexpr uint32 DEFAULT_MEMORY_COST = (1u << 17)
 
static constexpr uint32 PARALLELISM = 1
 

Detailed Description

Definition at line 28 of file Argon2.h.

Member Function Documentation

◆ Hash()

Optional< std::string > Trinity::Crypto::Argon2::Hash ( std::string const &  password,
BigNumber const &  salt,
uint32  nIterations = DEFAULT_ITERATIONS,
uint32  kibMemoryCost = DEFAULT_MEMORY_COST 
)
static

Definition at line 21 of file Argon2.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Verify()

bool Trinity::Crypto::Argon2::Verify ( std::string const &  password,
std::string const &  hash 
)
static

Definition at line 40 of file Argon2.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ DEFAULT_ITERATIONS

constexpr uint32 Trinity::Crypto::Argon2::DEFAULT_ITERATIONS = 10
staticconstexpr

Definition at line 32 of file Argon2.h.

◆ DEFAULT_MEMORY_COST

constexpr uint32 Trinity::Crypto::Argon2::DEFAULT_MEMORY_COST = (1u << 17)
staticconstexpr

Definition at line 33 of file Argon2.h.

◆ ENCODED_HASH_LEN

constexpr uint32 Trinity::Crypto::Argon2::ENCODED_HASH_LEN = 100
staticconstexpr

Definition at line 31 of file Argon2.h.

◆ HASH_LEN

constexpr uint32 Trinity::Crypto::Argon2::HASH_LEN = 16
staticconstexpr

Definition at line 30 of file Argon2.h.

◆ PARALLELISM

constexpr uint32 Trinity::Crypto::Argon2::PARALLELISM = 1
staticconstexpr

Definition at line 34 of file Argon2.h.


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