DigiKaze

checkPass(password)

Apr 27th, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. function checkPass( password ) { var total = 0 ;
  3. var charlist = "abcdefghijklmnopqrstuvwxyz" ;
  4. for ( var i = 0; i < password.length; i++ ) {
  5. var countone = password.charAt ( i ) ;
  6. var counttwo = ( charlist.indexOf( countone )) ;
  7. counttwo++;
  8. total *= 17;
  9. total += counttwo;
  10. }
  11. document.write(total,"<br>");}
  12.  
  13. /* in the application the code will pass when the password makes total == 248410397744610 */
  14.  
  15. </script>
Advertisement
Add Comment
Please, Sign In to add comment