| 143 | } |
| 144 | |
| 145 | QString OAuthService::generateRandomString(int length) |
| 146 | { |
| 147 | const char charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; |
| 148 | QString result; |
| 149 | result.reserve(length); |
| 150 | auto *rng = QRandomGenerator::global(); |
| 151 | for (int i = 0; i < length; i++) |
| 152 | result.append(charset[rng->bounded(64)]); |
| 153 | return result; |
| 154 | } |
| 155 | |
| 156 | QString OAuthService::computeCodeChallenge(const QString &verifier) |
| 157 | { |
nothing calls this directly
no outgoing calls
no test coverage detected