Generated a random secure integer from [0, max[
(max int)
| 48 | |
| 49 | // Generated a random secure integer from [0, max[ |
| 50 | func secureRandomInt(max int) int { |
| 51 | randomInt := must(rand.Int(rand.Reader, big.NewInt(int64(max)))) |
| 52 | return int(randomInt.Int64()) |
| 53 | } |
| 54 | |
| 55 | type EncryptedString struct { |
| 56 | KeyID string `json:"key_id"` |
no test coverage detected