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

Function generateIV

packages/shared/src/crypto.ts:14–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12const publicKeyCache = new Map<string, string>();
13
14const generateIV = (): Buffer => {
15 return crypto.randomBytes(ivLength);
16};
17
18export function encrypt(text: string): { iv: string; encryptedData: string } {
19 const encryptionKey = Buffer.from(env.SOURCEBOT_ENCRYPTION_KEY, 'ascii');

Callers 1

encryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected