forked from FoundKeyGang/FoundKey
reduce duplication in secureRndstr
This commit is contained in:
parent
5f83383ab8
commit
af43df15ca
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as crypto from 'node:crypto';
|
||||
|
||||
const L_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||
const LU_CHARS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
const LU_CHARS = L_CHARS + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
|
||||
export function secureRndstrCustom(length = 32, chars: string): string {
|
||||
const chars_len = chars.length;
|
||||
|
|
Loading…
Reference in a new issue