How To Get The Hash of A File In Node.js

How To Get The Hash of A File In Node.js

node logo

While working on a project, I wanted to do an integrity check of a file that I was referencing. So, I needed to know how to get the hash of a file in Node.js. And this post is about that. We will use the and modules that are available in Node.js to get the hash of a file. We will be using the createReadStream method of the fs module to read the file and get its contents. After we are done…

Source