(plaintext: T)
| 6 | * `data_drains.destination_credentials`. Wraps the shared AES-256-GCM helper. |
| 7 | */ |
| 8 | export async function encryptCredentials<T>(plaintext: T): Promise<string> { |
| 9 | const { encrypted } = await encryptSecret(JSON.stringify(plaintext)) |
| 10 | return encrypted |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * Decrypts the inverse of `encryptCredentials`. The caller is expected to run |
no test coverage detected