SHARE
TWEET

Untitled

a guest Feb 18th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict'
  2.  
  3. const crypto = require('crypto');
  4. const fs = require('fs');
  5. const shasum = crypto.createHash('sha1');
  6.  
  7. const app_a = __dirname + '/path/to/file.txt';
  8. fs.readFile(app_a, (err, data) => {
  9.   shasum.update(data);
  10.   console.log(app_a, shasum.digest('hex'));
  11. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top