• Encrypt or decrypt a string using AES-256 (AES-GCM).

    Parameters

    • input: string

      Source string to encrypt or decrypt.

    • key: CryptoKey

      CryptoKey to use. Decryption CryptoKey must match encryption CryptoKey that was used.

    • iv: Uint8Array

      Iv to use. Decryption iv must match encryption iv that was used.

    • mode: "decrypt" | "encrypt"

      Toggle between encryption and decryption.

    Returns Promise<string>

    • Processed result.

Generated using TypeDoc