You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using NPOI.SS.Formula.Eval;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Core.Helper
|
|
|
|
|
{
|
|
|
|
|
public static class PasswordCheckHelper
|
|
|
|
|
{
|
|
|
|
|
public const string REGEX_PASSWORD_STRONG = "^(?![0-9]+$)(?![^0-9]+$)(?![a-zA-Z]+$)(?![^a-zA-Z]+$)(?![a-zA-Z0-9]+$)[a-zA-Z0-9\\S]{8,30}$";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 验证密码强度是否符合要求
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="password"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static bool Check(string password)
|
|
|
|
|
{
|
|
|
|
|
return Regex.IsMatch(password, REGEX_PASSWORD_STRONG);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|