fix for max-inclusive

This commit is contained in:
Andreas Brett 2021-10-11 01:18:33 +02:00
parent 0e6d7694ce
commit dc1de50a02
2 changed files with 128 additions and 128 deletions

View file

@ -116,7 +116,7 @@ function genSecret(length = 64) {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
const charsLength = chars.length;
for ( let i = 0; i < length; i++ ) {
secret += chars.charAt(getCryptoRandomInt(0, charsLength));
secret += chars.charAt(getCryptoRandomInt(0, charsLength - 1));
}
return secret;
}

View file

@ -128,7 +128,7 @@ export function genSecret(length = 64) {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
const charsLength = chars.length;
for ( let i = 0; i < length; i++ ) {
secret += chars.charAt(getCryptoRandomInt(0, charsLength));
secret += chars.charAt(getCryptoRandomInt(0, charsLength - 1));
}
return secret;
}