1#ifndef MSTL_CORE_ENCRYPT_SHA1_HPP__
2#define MSTL_CORE_ENCRYPT_SHA1_HPP__
3#include "../string/string.hpp"
11 static bstring hash(bstring_view
data);
12 static string hash_hex(bstring_view
data);
16MSTL_ALWAYS_INLINE_INLINE
string sha1(
const bstring&
data) {
17 return SHA1::hash_hex(
data.view());
19MSTL_ALWAYS_INLINE_INLINE
string sha1(
const string&
data) {
20 return sha1(to_bstring(
data));
23MSTL_ALWAYS_INLINE_INLINE
string sha1(
const bstring_view
data) {
24 return SHA1::hash_hex(
data);
26MSTL_ALWAYS_INLINE_INLINE
string sha1(
const string_view
data) {
27 return sha1(to_bstring(
data));
unsigned int uint32_t
32位无符号整数类型
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL
MSTL_NODISCARD MSTL_ALWAYS_INLINE constexpr decltype(auto) data(Container &cont) noexcept(noexcept(cont.data()))
获取容器的底层数据指针