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