MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / encryptActivationCode

Function encryptActivationCode

packages/shared/src/crypto.ts:231–234  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

229}
230
231export function encryptActivationCode(code: string): string {
232 const { iv, encryptedData } = encrypt(code);
233 return Buffer.from(JSON.stringify({ iv, encryptedData })).toString('base64');
234}
235
236export function decryptActivationCode(encrypted: string): string {
237 const { iv, encryptedData } = JSON.parse(Buffer.from(encrypted, 'base64').toString('utf8'));

Callers 1

activateLicenseFunction · 0.90

Calls 1

encryptFunction · 0.85

Tested by

no test coverage detected