()
| 122 | } |
| 123 | |
| 124 | func saltSecret() (string, error) { |
| 125 | rb := make([]byte, randInt(10, 100)) |
| 126 | _, err := rand.Read(rb) |
| 127 | if err != nil { |
| 128 | return "", err |
| 129 | } |
| 130 | |
| 131 | return base64.URLEncoding.EncodeToString(rb), nil |
| 132 | } |
| 133 | |
| 134 | func randInt(min int, max int) int { |
| 135 | return min + mt.Intn(max-min) |
no test coverage detected