code: static byte[] dbl(byte[] in) {
  		byte[] ret = new byte[in.length];
  		int carry = shiftLeft(in, ret);
  		int xor = 0xff & DOUBLING_CONST;
  
  		/*
  		 * NOTE: This construction is an attempt at a constant-time implementation.
  		 */
  		int mask = (-carry) & 0xff;
  		ret[in.length - 1] ^= xor & mask;
  
  		return ret;
  	}
docs: Code taken from {@link org.bouncycastle.crypto.macs.CMac}