public byte[] crypt(byte[] data) {
		int remaining = data.length;
		int llength = 0x5B0;
		int start = 0;
		while (remaining > 0) {
			byte[] myIv = BitTools.multiplyBytes(this.iv, 4, 4);
			if (remaining < llength) {
				llength = remaining;
			}
			for (int x = start; x < (start + llength); x++) {
				if ((x - start) % myIv.length == 0) {
					try {
						byte[] newIv = cipher.doFinal(myIv);
						for (int j = 0; j < myIv.length; j++) {
							myIv[j] = newIv[j];
						}
					// System.out
					// .println("Iv is now " + HexTool.toString(this.iv));
					} catch (IllegalBlockSizeException e) {
						e.printStackTrace();
					} catch (BadPaddingException e) {
						e.printStackTrace();
					}
				}
				data[x] ^= myIv[(x - start) % myIv.length];
			}
			start += llength;
			remaining -= llength;
			llength = 0x5B4;
		}
		updateIv();
		return data;
	}