13 lines
221 B
JavaScript
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;
|