Ciphertext to be decrypted.
Password to use to decrypt ciphertext.
Decrypted content. If ciphertext is a string, the plaintext is a string. If ciphertext is a Uint8Array, the plaintext is a new Uint8Array.
const plaintext = await aesGcmDecrypt(ciphertext, 'pw');
aesGcmDecrypt(ciphertext, 'pw').then(function(plaintext) { console.log(plaintext); });
Decrypts ciphertext encrypted with aesGcmEncrypt() using supplied password. (c) Chris Veness MIT Licence
https://gist.github.com/chrisveness/43bcda93af9f646d083fad678071b90a Modified to work with Uint8Array and string content.