function symmetricEncrypt
symmetricEncrypt(
plaintext: string,
key: CryptoKey,
): Promise<KeyEncrypted>

AES-GCM encrypts to enc:1:<base64 iv>:<base64 ciphertext>.

Parameters

plaintext: string

Return Type

Promise<KeyEncrypted>

Usage

import { symmetricEncrypt } from "doc.ts";