code: public byte[] update(byte[] input){
  		if(!cfg){
  			throw new RuntimeException("Cipher not configured.");//TODO
  		}
  		if(input.length == 0)
  			return new byte[]{};//null;
  		if(bufferIndex != 0){
  			byte[] in2 = Arrays.copyOf(buffer, input.length + bufferIndex);//new byte[input.length + bufferIndex];
  			//System.out.println(Misc.bytesToHex(in2));
  			//System.arraycopy(buffer, 0, in2, 0, bufferIndex);
  			System.arraycopy(input, 0, in2, bufferIndex, input.length);
  			input = in2;
  		}
  		
  		int numBlocks = (int) Math.floor(input.length/blockSize);
  		//System.out.println(numBlocks);
  		byte[] out = new byte[blockSize * numBlocks];
  		for(int i = 0; i < numBlocks; i++){
  			//System.out.println("i:"+i+" block:" + blockNo);
  			System.arraycopy(input, blockSize*i, buffer, 0, blockSize);
  			System.arraycopy(cryptBlock(), 0, out, i * blockSize, blockSize);
  			blockNo++;
  		}
  		buffer = new byte[blockSize];
  		if(input.length % blockSize == 0){
  			
  			bufferIndex = 0;
  		}else{
  			//buffer = new byte[BLOCKSIZE];
  			System.arraycopy(input, numBlocks*blockSize, buffer, 0, input.length - numBlocks*blockSize);
  			bufferIndex = input.length - numBlocks*blockSize;
  		}
  		//System.out.println(Misc.bytesToHex(out));
  		return out;
  	}
docs: Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part.
  The bytes in the input buffer are processed, and the result is stored in a new buffer.
  
  If input has a length of zero, this method returns null.
  @param input
  @return