Function: decryptData()
decryptData(Defined in: crypto.ts:123 Reverse encryptData. Verifies the GCM authentication tag before returning plaintext — tampered ciphertexts throw.encryptedData,encryptionKey):Promise<string>
Parameters
encryptedData
string
Base64 string produced by encryptData.
encryptionKey
string
Same key/password used to encrypt. Wrong keys
throw an “Unsupported state or unable to authenticate data” error
from Node — the authenticated tag failure is indistinguishable from
tampering, by design.
Returns
Promise<string>
The original UTF-8 plaintext.