Using Dropbox zxcvbn password security rating

I'm trying to get zxcvbn, Dropbox password security rating , to work correctly ... but I have some problems!

I have enabled the asynchronous bootloader.

My next problem is that I donโ€™t know enough JS to figure out how to actually use this thing ....

<input id="password" name="password" size="35" class="textInput required" type="password"> 

is any monitor used in this field?

Thanks for the help, I'm still learning JS / jQuery ...

+8
javascript jquery dropbox
source share
1 answer
 <input id="password" name="password" size="35" class="textInput required" type="password"/> <div id="result"> Laaa laa laa... </div> 

 $('#password').keyup(function() { var textValue = $(this).val(); var result = zxcvbn(textValue); $('#result').html("cracktime : " + result.crack_time); //use this result as you like /* result.entropy # bits result.crack_time # estimation of actual crack time, in seconds. result.crack_time_display # same crack time, as a friendlier string: # "instant", "6 minutes", "centuries", etc. result.score # [0,1,2,3,4] if crack time is less than # [10**2, 10**4, 10**6, 10**8, Infinity]. # (useful for implementing a strength bar.) result.match_sequence # the list of patterns that zxcvbn based the # entropy calculation on. result.calculation_time # how long it took to calculate an answer, # in milliseconds. usually only a few ms. */ }); 

The script is for you, http://jsfiddle.net/MhZ4p/

replace traverse function only for crack time

 traverse(result); 

in

 $('#result').html("cracktime : " + result.crack_time); 
+16
source share

All Articles