From dd795f71096b81f8e697996c6694edfac42511e5 Mon Sep 17 00:00:00 2001 From: sumeyyeKurtulus Date: Thu, 6 Jun 2024 10:36:16 +0300 Subject: [PATCH] update: random password generator --- .../packages/core/src/lib/utils/generator-utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts index 7b95e71a59..ed58ba97ef 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts @@ -19,10 +19,10 @@ export function generateHash(value: string): number { export function generatePassword(length = 8) { length = Math.min(Math.max(4, length), 128); - const lowers = 'abcdefghijklmnopqrstuvwxyz'; - const uppers = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - const numbers = '0123456789'; - const specials = '!@#$%&*()_+{}<>?[]./'; + const lowers = 'abcdefghjkmnpqrstuvwxyz'; + const uppers = 'ABCDEFGHJKMNPQRSTUVWXYZ'; + const numbers = '23456789'; + const specials = '!*_#/+-.'; const all = lowers + uppers + numbers + specials; const getRandom = (chrSet: string) => chrSet[Math.floor(Math.random() * chrSet.length)];