//This provides SHA3 alterntive for browsers
//it will autmatically be used if this module is browserified

var sha3 = require('crypto-js/sha3'),
encHex = require('crypto-js/enc-hex');

var hash = function () {
  this.content = '';
};

hash.prototype.update = function (i) {
  this.content = Buffer.isBuffer(i) ? encHex.parse(i.toString('hex')) : i;
};

hash.prototype.digest = function () {
  return sha3(this.content, {
    outputLength: 256
  }).toString();
};

module.exports = {
  SHA3Hash: hash
};

@@ -100,20 +100,21 @@
 erified%0A
-%0Avar
+const
  sha3 = 
@@ -142,10 +142,15 @@
 a3')
-,
 %0A
+const 
 encH
@@ -182,17 +182,16 @@
 nc-hex')
-;
 %0A%0Avar ha
@@ -228,20 +228,18 @@
 ent = ''
-;
 %0A%7D
-;
 %0A%0Ahash.p
@@ -344,20 +344,18 @@
 x')) : i
-;
 %0A%7D
-;
 %0A%0Ahash.p
@@ -457,12 +457,10 @@
 ng()
-;
 %0A%7D
-;
 %0A%0Amo
@@ -497,7 +497,6 @@
 ash%0A
+
 %7D
-;
 %0A

Update sha3.js