List of utility methods to do Bit Shift
byte[] | bitShiftLeft(byte[] data) bit Shift Left byte[] shifted = new byte[data.length]; int carry = 0; for (int i = data.length - 1; i >= 0; i--) { int newCarry = getMostSignificantBit(data[i]); shifted[i] = (byte) (data[i] << 1); shifted[i] |= carry; carry = newCarry; return shifted; |