Skip to content

Commit

Permalink
FIX #98 add a padding digit to increase the length to max 32 (instead…
Browse files Browse the repository at this point in the history
… of 31)
  • Loading branch information
hepabolu committed Aug 18, 2024
1 parent cc58dad commit 0bcce49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/presets.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const thePresets = {
separator_type: 'RANDOM',
separator_alphabet: '-+=.*_|~',
padding_digits_before: 2,
padding_digits_after: 2,
padding_digits_after: 3,
padding_type: 'FIXED',
padding_character_type: 'RANDOM',
padding_alphabet: '!@$%^&*+=:|~',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/xkpasswd.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ describe('Test XKPassword class', () => {
const password = me.password();

// eslint-disable-next-line max-len
const re = /[!@$%^&*+=:|~]\d\d([-+=.*_|~][a-zA-Z]{4,5}){4}[-+=.*_|~]\d\d[!@$%^&*+=:|~]/;
const re = /[!@$%^&*+=:|~]\d\d([-+=.*_|~][a-zA-Z]{4,5}){4}[-+=.*_|~]\d\d\d[!@$%^&*+=:|~]/;

expect(password).toMatch(re);
});
Expand Down

0 comments on commit 0bcce49

Please sign in to comment.