how to enable crypto in node js

924 views Asked by At

I am including crypto module in node.js, but its methods are not accessible

var crypto = require("crypto");
exports.testSHA = function(req,res) {
    var shasum = crypto.createHash('sha1');
}

on createHash it says Unresolved function or method createHash().

Is there anything to include a module?

0

There are 0 answers