public static byte[] decrypt(byte[] data, byte[] key) {
		byte[] tmp = new byte[data.length];
		byte[] bloc = new byte[16];
		key = paddingKey(key);
		S = generateSubkeys(key);

		int i;
		for(i=0;i<data.length;i++){
			if(i>0 && i%16 == 0){
				bloc = decryptBloc(bloc);
				System.arraycopy(bloc, 0, tmp, i-16, bloc.length);
			}
			
			if (i < data.length)
				bloc[i % 16] = data[i];
		}

		bloc = decryptBloc(bloc);
		System.arraycopy(bloc, 0, tmp, i - 16, bloc.length);
		
		tmp = deletePadding(tmp);
		return tmp;
	}