change resize algorithm and slot usage
[iotcloud.git] / src / java / iotcloud / CloudComm.java
index 964b7c04d51f9b95b28100da31d9a19af8ec107d..ac906b145321606ba80b9246f1e051deebc10894 100644 (file)
@@ -23,6 +23,7 @@ class CloudComm {
        SecureRandom random;
        static final int SALT_SIZE = 8;
        byte salt[];
+       Table table;
        
        /**
         * Empty Constructor needed for child class.
@@ -35,7 +36,8 @@ class CloudComm {
         * Constructor for actual use. Takes in the url and password.
         */
 
-       CloudComm(String _baseurl, String _password) {
+       CloudComm(Table _table, String _baseurl, String _password) {
+               this.table=_table;
                this.baseurl=_baseurl;
                this.password = _password;
                this.random = new SecureRandom();
@@ -222,7 +224,7 @@ class CloudComm {
 
                        data = decryptCipher.doFinal(data);
 
-                       slots[i]=Slot.decode(data, mac);
+                       slots[i]=Slot.decode(table, data, mac);
                }
                dis.close();
                return slots;