ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
tools_hash.h File Reference

哈希和摘要算法工具函数声明。 More...

Namespaces

namespace  ngl::tools
 工具函数命名空间。

Functions

std::string ngl::tools::md5 (const std::string &atext)
 计算字符串的MD5哈希值
std::string ngl::tools::sh1 (std::string_view atext)
 计算字符串的SHA1哈希值
std::string ngl::tools::hmac_sha1 (const std::string &akey, const std::string &atext)
 计算HMAC-SHA1消息认证码

Detailed Description

哈希和摘要算法工具函数声明。

提供常用的哈希和摘要算法接口,包括MD5、SHA1和HMAC-SHA1。 用于密码存储、数据完整性校验、API签名等场景。