fix: build for 32-bit platform

This commit is contained in:
Hintay 2025-02-10 14:57:26 +09:00
parent 9184711d43
commit 69a7f38ba7
No known key found for this signature in database
GPG key ID: 120FC7FF121F2F2D
2 changed files with 3 additions and 3 deletions

View file

@ -19,8 +19,8 @@ type RecoveryCodesResponse struct {
}
func generateRecoveryCode() string {
// generate recovery code, 10 hex numbers
return fmt.Sprintf("%010x", rand.Intn(0x10000000000))
// generate recovery code, 10 hex numbers with a dash in the middle
return fmt.Sprintf("%05x-%05x", rand.Intn(0x100000), rand.Intn(0x100000))
}
func generateRecoveryCodes(count int) []model.RecoveryCode {