MCPcopy Index your code
hub / github.com/FxEmbed/FxEmbed / base64UrlToBuffer

Function base64UrlToBuffer

tools/credential-tools.mjs:52–56  ·  view source on GitHub ↗
(b64url)

Source from the content-addressed store, hash-verified

50}
51
52function base64UrlToBuffer(b64url) {
53 const pad = '='.repeat((4 - (b64url.length % 4)) % 4);
54 const b64 = (b64url + pad).replace(/-/g, '+').replace(/_/g, '/');
55 return Buffer.from(b64, 'base64');
56}
57
58function encrypt() {
59 if (!existsSync(PLAINTEXT_PATH)) {

Callers 1

encryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected