ethers.js/utils/keccak256.js

9 lines
261 B
JavaScript
Raw Normal View History

2018-06-13 22:39:39 +03:00
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var sha3 = require("js-sha3");
2018-06-17 23:47:28 +03:00
var bytes_1 = require("./bytes");
2018-06-13 22:39:39 +03:00
function keccak256(data) {
2018-06-17 23:47:28 +03:00
return '0x' + sha3.keccak_256(bytes_1.arrayify(data));
2018-06-13 22:39:39 +03:00
}
exports.keccak256 = keccak256;