diff options
Diffstat (limited to 'src/common/Cryptography/TOTP.h')
-rw-r--r-- | src/common/Cryptography/TOTP.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/common/Cryptography/TOTP.h b/src/common/Cryptography/TOTP.h index 02e5b9adffc..0aba8ff867e 100644 --- a/src/common/Cryptography/TOTP.h +++ b/src/common/Cryptography/TOTP.h @@ -22,19 +22,16 @@ #include <ctime> #include <vector> -namespace Trinity +namespace Trinity::Crypto { -namespace Crypto -{ -struct TC_COMMON_API TOTP -{ - static constexpr std::size_t RECOMMENDED_SECRET_LENGTH = 20; - using Secret = std::vector<uint8>; + struct TC_COMMON_API TOTP + { + static constexpr size_t RECOMMENDED_SECRET_LENGTH = 20; + using Secret = std::vector<uint8>; - static uint32 GenerateToken(Secret const& key, time_t timestamp); - static bool ValidateToken(Secret const& key, uint32 token); -}; -} + static uint32 GenerateToken(Secret const& key, time_t timestamp); + static bool ValidateToken(Secret const& key, uint32 token); + }; } #endif |