(storedKey: string)
| 27 | * @returns true if the key is encrypted, false if it's plain text |
| 28 | */ |
| 29 | export function isEncryptedKey(storedKey: string): boolean { |
| 30 | // Check if it follows the encrypted format: iv:encrypted:authTag |
| 31 | return storedKey.includes(':') && storedKey.split(':').length === 3 |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Encrypts an API key for secure storage |
no outgoing calls
no test coverage detected