Guest User

Untitled

a guest
Jul 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. crypto = require('crypto');
  2. // ...
  3. hash = new crypto.createHash('md5');
  4. // ...
  5. data.value = new Buffer(stats.size);
  6. // ....
  7.  
  8.  
  9. hash.update(data.value.toString('utf8'));
  10. // or
  11. hash.update(data.value)
  12. // both resulting in "TypeError: HashUpdate fail"
  13.  
  14.  
  15. tag.value = hash.digest('base64');
Add Comment
Please, Sign In to add comment