-
+ EAA5FE29FDDAF348EE9CA7B03DFB5CACBC5E1FCC9D56BBCA9300BB0760E881C6C6C61F36E1525060339C089851109911E75440FA77A7A68D75731E8DBAF138CB
mp-wp/wp-admin/js/password-strength-meter.js
(0 . 0)(1 . 23)
50749 // Password strength meter
50750
50751 function passwordStrength(password,username) {
50752 var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4;
50753
50754 //password < 4
50755 if (password.length < 4 ) { return shortPass };
50756
50757 //password == username
50758 if (password.toLowerCase()==username.toLowerCase()) return badPass;
50759
50760 var symbolSize = 0;
50761 if (password.match(/[0-9]/)) symbolSize +=10;
50762 if (password.match(/[a-z]/)) symbolSize +=26;
50763 if (password.match(/[A-Z]/)) symbolSize +=26;
50764 if (password.match(/[^a-zA-Z0-9]/)) symbolSize +=31;
50765
50766 var natLog = Math.log( Math.pow(symbolSize,password.length) );
50767 var score = natLog / Math.LN2;
50768 if (score < 40 ) return badPass
50769 if (score < 56 ) return goodPass
50770 return strongPass;
50771 }