şundan çatallanmış cisti/facciamo
22 satır
786 B
JavaScript
22 satır
786 B
JavaScript
moment.locale('it');
|
|
var app = new Vue({
|
|
el: '#passwordTest',
|
|
data: {
|
|
password: '',
|
|
estimationScore: 0,
|
|
score: ['inutile', 'pessima', 'brutta', 'così così', 'buona'],
|
|
scoreColor: 'red',
|
|
slowCrackTime: '',
|
|
fastCrackTime: '',
|
|
sequence: [],
|
|
},
|
|
methods: {
|
|
checkStrength (e) {
|
|
var estimation = zxcvbn(this.password, ['diocane', 'dioporco', 'porcodio', 'madonnacane'])
|
|
this.estimationScore = estimation.score;
|
|
this.slowCrackTime = moment.duration(estimation.crack_times_seconds.offline_slow_hashing_1e4_per_second, 'seconds').humanize();
|
|
this.fastCrackTime = moment.duration(estimation.crack_times_seconds.offline_fast_hashing_1e10_per_second, 'seconds').humanize();
|
|
this.sequence = estimation.sequence;
|
|
},
|
|
}
|
|
})
|