GenerateKey generates the "key" part of the token.
(_ context.Context)
| 120 | |
| 121 | // GenerateKey generates the "key" part of the token. |
| 122 | func GenerateKey(_ context.Context) (string, error) { |
| 123 | var b [keyLength]byte |
| 124 | _, err := rand.Read(b[:]) |
| 125 | if err != nil { |
| 126 | return "", err |
| 127 | } |
| 128 | return enc.EncodeToString(b[:]), nil |
| 129 | } |
no test coverage detected