2013年5月4日

.NET:可扩展的 “密码强度” 代码示例

摘要: 场景在企业应用中,我们经常需要限制用户的密码强度。问题如何以可扩展的方式支持不同企业应用的密码强度要求?思路算法思路:密码强度 = 求和(每个规则的强度 * 权重)。可扩展思路:以聚合的形式管理各种规则,让用户可以扩展自定义规则。实现设计类图示例代码PasswordStrengthService 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace PasswordSt. 阅读全文

posted @ 2013-05-04 07:45 幸福框架 阅读(1962) 评论(10) 推荐(2) 编辑

导航

我要啦免费统计