fugadalcontrollo/views/password.pug
2018-08-11 01:26:31 +02:00

16 lines
No EOL
445 B
Text

extends layout
block content
p.
Bla bla bla qui devi scegliere una password
input#password(type="password", name="password")
p#crackTime
script(src="/js/zxcvbn.js")
script.
var crackTime = document.getElementById('crackTime')
document.getElementById('password').oninput = function(ev, t) {
var ret = zxcvbn(this.value)
crackTime.innerHTML = ret.crack_times_display.offline_fast_hashing_1e10_per_second;
}