Added Js code (40%)
[iotcloud.git] / src / js / iotjs / orig / slot.js
1 class Slot{
2         constructor(seqnum,machineid,prevhmac,hmac){
3                 this.SLOT_SIZE=2048;
4                 this.RESERVED_SPACE=64;
5                 this.HMAC_SIZE=32;
6                 (typeof seqnum === "number")? this.seqnum = seqnum : throw new Error("seqnum should be a number");
7                 (typeof machineid === "number")? this.machineid = seqnum : throw new Error("seqnum should be a number");
8
9         }
10 }