ethers.js/utils/keccak256.js
2017-02-24 14:57:46 -05:00

13 lines
221 B
JavaScript

'use strict';
var sha3 = require('js-sha3');
var convert = require('./convert.js');
function keccak256(data) {
data = convert.arrayify(data);
return '0x' + sha3.keccak_256(data);
}
module.exports = keccak256;