Skip to content

Commit

Permalink
removed strength normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
ngn13 authored Jan 3, 2024
1 parent 8e564dc commit e12fae8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/api/util/utility/passwordStrength.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,5 @@ export function checkPassword(password: string): number {
}

strength += calculateEntropy(password);
// Strength should between 0 and 1??? (am I wrong?)
// Normalize the strength score to the range [0, 1]
const MAX_STRENGTH = 2.0; // Maximum possible strength score
strength = strength / MAX_STRENGTH;

return strength;
}

0 comments on commit e12fae8

Please sign in to comment.