MCPcopy Create free account
hub / github.com/ConsortiumAI/Consortium / encodeBase64Url

Function encodeBase64Url

packages/consortium-cli/src/api/encryption.ts:21–27  ·  view source on GitHub ↗
(buffer: Uint8Array)

Source from the content-addressed store, hash-verified

19 * Encode a Uint8Array to base64url string (URL-safe base64)
20 */
21export function encodeBase64Url(buffer: Uint8Array): string {
22 return Buffer.from(buffer)
23 .toString('base64')
24 .replaceAll('+', '-')
25 .replaceAll('/', '_')
26 .replaceAll('=', '')
27}
28
29/**
30 * Decode a base64 string to a Uint8Array

Callers 3

generateAppUrlFunction · 0.90
doAuthFunction · 0.90
encodeBase64Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected