How to decrypt data encrypted with PHP's mcrypt using Node.js

I got into trouble when I tried to decrypt data encrypted with PHP's mcrypt using Node.js, so here is a note on the cause and solution. situation I received data that I was told was encrypted with AES256-CBC in PHP, but when I tried to decrypt it in Node.js, I got an error. The data was encrypted a…