Unverified Commit 4411a99d authored by Darshan Sen's avatar Darshan Sen Committed by Myles Borins
Browse files

test: fix flaky test-webcrypto-encrypt-decrypt-aes

* Use a copy of plaintext to prevent tampering of the original
* Since subtle.decrypt returns a Promise containing an ArrayBuffer and
  ArrayBuffers cannot be modified directly, create a Buffer from it
  right away so that the modification in the next line works as intended

Fixes: https://github.com/nodejs/node/issues/35586

PR-URL: https://github.com/nodejs/node/pull/37380


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarMyles Borins <myles.borins@gmail.com>
parent 38f6e5a7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment