If a php openssl_encrypt is converted to node, it will not succeed?

how do you write the following code in node?

const hash = crypto.createHash( "MD5" )
hash.update( aesKey )
const aesKeySignStr = hash.digest()
const iv = Math.random().toString( 36 ).substr( 2 )

const cipher = crypto.createCipher( "aes-128-cbc", aesKeySignStr, iv )
console.log( JSON.stringify( this.params ) );
let crypted = cipher.update( JSON.stringify( this.params ), "utf8", "hex" )
crypted += cipher.final( "hex" )

Please help me.

Mar.10,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30e49-2bd5b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30e49-2bd5b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?