MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / generateRandomString

Method generateRandomString

ui-linux/src/oauthservice.cpp:145–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145QString 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
156QString OAuthService::computeCodeChallenge(const QString &verifier)
157{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected