|
|
@ -133,7 +133,7 @@ module.exports = { |
|
|
|
* @return {Object} - return sha3ied value |
|
|
|
* @return {Object} - return sha3ied value |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
sha3_256: function (value) { |
|
|
|
sha3_256: function (value) { |
|
|
|
if (typeof value === 'string' && !value.startsWith('0x')) { |
|
|
|
if (typeof value === 'string' && value.indexOf('0x') !== 0) { |
|
|
|
value = '0x' + value |
|
|
|
value = '0x' + value |
|
|
|
} |
|
|
|
} |
|
|
|
var ret = ethutil.bufferToHex(ethutil.setLengthLeft(value, 32)) |
|
|
|
var ret = ethutil.bufferToHex(ethutil.setLengthLeft(value, 32)) |
|
|
|