PKCS7 encrypt decrypt in Node.js

I am using pkcs7 encrypt decrypt in current project. I want to change from PHP to Node.js. Is there pkcs7 encrypt/decrypt in Node.js ?

In PHP,

<?php

$data = <<<EOD
Hello world
EOD;

// load key
$key = file_get_contents("mypublickey.crt");

// save message to file
$fp = fopen("msg.txt", "w");
fwrite($fp, $data);
fclose($fp);

// encrypt it
if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", $key,array())) {
    // message encrypted - send it!

}
?>

to decrypt

<?php
// The certification stuff
$public = file_get_contents("mypublickey.crt");
$private = array(file_get_contents("myprivatekey.pem"), "mypassword");

$infile = tempnam("", "enc");
file_put_contents($infile, $encrypted); 
$outfile = tempnam("", "dec");

if(openssl_pkcs7_decrypt("enc.txt", "dec.txt", $public, $private))
{
    // Decryption successful
    echo file_get_contents("dec.txt");
}
?>

Is there any similar function like this in Node.js ?