1
0

refactor: migrate logger

This commit is contained in:
2026-07-15 15:33:05 +08:00
parent 1cc6b7b1ba
commit 9f7fd6e5e7
5 changed files with 112 additions and 22 deletions

View File

@@ -50,9 +50,9 @@ func GenerateToken(username string) string {
return hex.EncodeToString(sum[:])
}
// GenerateSalt returns a random salt in the inclusive range [0, 6172748].
// GenerateSalt returns a random salt in the inclusive range [0, 6172748).
func GenerateSalt() int {
return rand.Intn(6172749)
return rand.Intn(6172748)
}
// ComputePasswordHashWithSalt returns the lowercased SHA-256 hex digest of