#ifndef UTILS_HPP #define UTILS_HPP #include #include #include #include namespace hashing { std::string GenerateSetting(unsigned long cost = 0); std::string HashPassword(const std::string& password, const std::string& setting); bool VerifyPassword(const std::string& password, const std::string& stored_password); std::string generate_token(size_t bytes = 32); } namespace timestamp { typedef std::chrono::system_clock::time_point Timestamp; Timestamp ParseTimestamp(const std::string& ts); Timestamp Now(); std::string FormatTimestamp(const Timestamp& ts); } #endif