TrinityCore
Trinity::Crypto::TOTP Struct Reference

#include <TOTP.h>

Public Types

using Secret = std::vector< uint8 >
 

Static Public Member Functions

static uint32 GenerateToken (Secret const &key, time_t timestamp)
 
static bool ValidateToken (Secret const &key, uint32 token)
 

Static Public Attributes

static constexpr size_t RECOMMENDED_SECRET_LENGTH = 20
 

Detailed Description

Definition at line 27 of file TOTP.h.

Member Typedef Documentation

◆ Secret

using Trinity::Crypto::TOTP::Secret = std::vector<uint8>

Definition at line 30 of file TOTP.h.

Member Function Documentation

◆ GenerateToken()

uint32 Trinity::Crypto::TOTP::GenerateToken ( TOTP::Secret const &  secret,
time_t  timestamp 
)
static

Definition at line 24 of file TOTP.cpp.

◆ ValidateToken()

bool Trinity::Crypto::TOTP::ValidateToken ( TOTP::Secret const &  secret,
uint32  token 
)
static

Definition at line 41 of file TOTP.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ RECOMMENDED_SECRET_LENGTH

constexpr size_t Trinity::Crypto::TOTP::RECOMMENDED_SECRET_LENGTH = 20
staticconstexpr

Definition at line 29 of file TOTP.h.


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