(text: string)
| 43 | |
| 44 | |
| 45 | export function hashSecret(text: string): string { |
| 46 | return crypto.createHmac('sha256', env.SOURCEBOT_ENCRYPTION_KEY).update(text).digest('hex'); |
| 47 | } |
| 48 | |
| 49 | export function generateApiKey(): { key: string; hash: string } { |
| 50 | const secret = crypto.randomBytes(32).toString('hex'); |
no outgoing calls
no test coverage detected