code: public static byte[] doSHEBlock(Block block, byte[] key){
  		//make sure key is at least 128 bits.
  		if(key.length < 16)
  			throw new RuntimeException("Key too short");
  		//make sure iv is at least 256 bits.
  		if(block.getIV().length < 32)
  			throw new RuntimeException("IV too short.");
  		//make sure text block is exactly 256 bits.
  		if(block.getText().length != 32)
  			throw new RuntimeException("Block is not 256 bits.");
  		
  		//create a copy of the iv so we can increment it
  		byte[] iv = new byte [32];
  		System.arraycopy(block.getIV(), 0, iv, 0, iv.length);
  		
  		//increment the iv based on the block number
  		iv[block.getBlockNo()%32] += block.getBlockNo()+1;
  		
  		return Misc.XOR(block.getText(), //xor the below with the text
  				Hash.getSHA256( //hash the key salted iv
  						Misc.XOR(key, iv))); // salt the iv with the key
  	}
docs: Calculate a single block with SimpleHashEncryption (see doSHE for details)
  @param block The block number, text and initialization vector for the block that is to be calculated
  @param key a 128 bit or stronger key
  @return an array containing the calculated block