mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-11-29 15:33:17 +01:00
17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = sha256Hash;
|
||
|
|
||
|
var _jsSha = require('js-sha3');
|
||
|
|
||
|
var _jsSha2 = _interopRequireDefault(_jsSha);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
function sha256Hash(data) {
|
||
|
return _jsSha2.default.sha3_256.create().update(data).hex();
|
||
|
}
|
||
|
module.exports = exports['default'];
|