From: joelbandi Date: Mon, 1 Aug 2016 12:44:14 +0000 (-0700) Subject: minor fix X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5db510e66534658d0e113677aec7eb3bf913b940;p=iotcloud.git minor fix --- diff --git a/src/js/iotjs/src/slot.js b/src/js/iotjs/src/slot.js index 0a2824b..c283546 100644 --- a/src/js/iotjs/src/slot.js +++ b/src/js/iotjs/src/slot.js @@ -26,12 +26,12 @@ var Slot = function () { if (prevhmac && prevhmac instanceof Uint8Array) { this.prevhmac = prevhmac; } else { - throw new Error("prevhmac input not valid"); + this.prevhmac = new Uint8Array(this.HMAC_SIZE); } if (hmac && hmac instanceof Uint8Array) { this.hmac = hmac; } else { - throw new Error("Hmac input not valid"); + this.hmac = null; } this.entries = []; this.freespace = this.SLOT_SIZE - getBaseSize(); //???????