encrypt(data:string,secret:string):Promise<string>
Encrypts a given string using a secret with AES-GCM.
| Parameter | Type | Description |
|---|---|---|
data | string | The plaintext data to encrypt. |
secret | string | The secret used to derive the encryption key. |
Promise<string>
Base64-encoded ciphertext.