MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / toBase64Url

Function toBase64Url

cli/src/utils/chatgpt-oauth.ts:64–70  ·  view source on GitHub ↗
(buffer: Buffer)

Source from the content-addressed store, hash-verified

62}
63
64function toBase64Url(buffer: Buffer): string {
65 return buffer
66 .toString('base64')
67 .replace(/\+/g, '-')
68 .replace(/\//g, '_')
69 .replace(/=/g, '')
70}
71
72function generateCodeVerifier(): string {
73 return toBase64Url(crypto.randomBytes(32))

Callers 2

generateCodeVerifierFunction · 0.70
generateCodeChallengeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected