Function aesGcmDecrypt

  • Decrypts ciphertext encrypted with aesGcmEncrypt() using supplied password. (c) Chris Veness MIT Licence Modified to work with Uint8Array and string content.


    const plaintext = await aesGcmDecrypt(ciphertext, 'pw');
    aesGcmDecrypt(ciphertext, 'pw').then(function(plaintext) { console.log(plaintext); });

    Type Parameters

    • T extends string | Uint8Array


    • ciphertext: T

      Ciphertext to be decrypted.

    • password: string | Uint8Array

      Password to use to decrypt ciphertext.

    Returns Promise<T>

    Decrypted content. If ciphertext is a string, the plaintext is a string. If ciphertext is a Uint8Array, the plaintext is a new Uint8Array.

Generated using TypeDoc