ethers.js/utils/keccak256.js

13 lines
221 B
JavaScript
Raw Normal View History

2017-02-24 22:57:46 +03:00
'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;