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