using U8Server.Util;
namespace U8Server.Extensions
{
public static class StringExtensions
{
///
/// 对字符串进行 MD5 加密(扩展方法)
///
/// 待加密的字符串
/// 是否返回大写形式
/// 是否返回 16 位 MD5(默认 32 位)
/// 加密后的字符串
public static string ToMD5Encrypt(this string input, bool uppercase = false, bool is16bit = false)
{
// 直接调用现有的 MD5Encryption.Encrypt 方法
return MD5Encryption.Encrypt(input, uppercase, is16bit);
}
}
}