* Encrypt token using Electron's safeStorage
(token: string)
| 26 | * Encrypt token using Electron's safeStorage |
| 27 | */ |
| 28 | function encryptToken(token: string): string { |
| 29 | if (!safeStorage.isEncryptionAvailable()) { |
| 30 | console.warn("[ClaudeCode] Encryption not available, storing as base64") |
| 31 | return Buffer.from(token).toString("base64") |
| 32 | } |
| 33 | return safeStorage.encryptString(token).toString("base64") |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Decrypt token using Electron's safeStorage |
no test coverage detected