(plainKey: string)
| 40 | } |
| 41 | |
| 42 | export function hashApiKey(plainKey: string): string { |
| 43 | return createHash('sha256').update(plainKey, 'utf8').digest('hex') |
| 44 | } |
| 45 | |
| 46 | function decryptApiKey(encryptedValue: string, apiEncryptionKey: string): string { |
| 47 | const parts = encryptedValue.split(':') |
no outgoing calls
no test coverage detected