auto generate cert keys

This commit is contained in:
Alireza Ahmadi
2024-06-13 20:16:04 +02:00
parent d057076251
commit b144aecb6a
11 changed files with 215 additions and 20 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ const RandomUtil = {
return btoa(String.fromCharCode(...array))
},
randomShortId(): string[] {
let shortIds = ['','','','']
for (var ii = 0; ii < 4; ii++) {
let shortIds = new Array(24).fill('')
for (var ii = 0; ii < 24; ii++) {
for (var jj = 0; jj < this.randomInt(8); jj++){
let randomNum = this.randomInt(256)
shortIds[ii] += ('0' + randomNum.toString(16)).slice(-2)