shgx_tz_mom/Infrastructure/ERP/Util/StringExtensions.cs
2025-06-09 16:41:26 +08:00

20 lines
747 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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