purescript-httpurple/docs/Examples/BinaryRequest/Main.js
Connor Prussin 6e886b91ac
Add support for non string requests (#184)
* First version of supporting non-string requests

* Clean up

* Minor cleanup

* Simplify to directly export the stream

* Add nl

* Clean up & add more testing

Co-authored-by: sigma-andex <sigma.andex@pm.me>
2021-11-15 20:02:36 -08:00

8 lines
158 B
JavaScript

'use strict';
const crypto = require('crypto');
exports.sha256sum = function(buffer) {
return crypto.createHash('sha256').update(buffer).digest('hex');
}