Allow more control over string generation to improve generated password compatibility

This commit is contained in:
2025-04-20 01:18:46 -04:00
parent 451d695649
commit 4ed816cb11
2 changed files with 16 additions and 11 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ import (
func DeviceIDGen(oldDeviceID string) (string, string) {
// generate new device ID
deviceIDPrefix, _ := os.Hostname()
deviceIDSuffix := core.StringGen(rand.Intn(32)+48, true, 0.2, true) + "-" + strconv.FormatInt(time.Now().Unix(), 10)
deviceIDSuffix := core.StringGen(rand.Intn(32)+48, 0.2, 0) + "-" + strconv.FormatInt(time.Now().Unix(), 10)
newDeviceID := deviceIDPrefix + "-" + deviceIDSuffix
// create new device ID file (locally)