namespace Milimoe.FunGame.Core.Api.Utility
{
///
/// 为字符串(string)添加扩展方法
///
public static class StringExtension
{
///
/// 使用 HMAC-SHA512 算法对文本进行加密
///
/// 需要加密的文本
/// 用于加密的秘钥
/// 加密后的 HMAC-SHA512 哈希值
public static string Encrypt(this string text, string key)
{
return Encryption.HmacSha512(text, key.ToLower());
}
}
}