result[padding++] = (byte) (((bl & 0x03) << 6) | ((rounds & 0x07) << 3) | (HAVAL_VERSION & 0x07)); result[padding++] = (byte) (bl >>> 2);
int sigByte = (bl & 0x03) << 6; sigByte |= (rounds & 0x07) << 3; sigByte |= HAVAL_VERSION & 0x07; result[padding++] = (byte) sigByte; result[padding++] = (byte)(bl >>> 2);
  protected byte[] padBuffer()  {    // pad out to 118 mod 128.  other 10 bytes have special use.    int n = (int) (count % BLOCK_SIZE);    int padding = (n < 118) ? (118 - n) : (246 - n);    byte[] result = new byte[padding + 10];    result[0] = (byte) 0x01;    // save the version number (LSB 3), the number of rounds (3 bits in the    // middle), the fingerprint length (MSB 2 bits and next byte) and the    // number of bits in the unpadded message.    int bl = hashSize * 8;    result[padding++] = (byte) (((bl & 0x03) << 6) | ((rounds & 0x07) << 3) | (HAVAL_VERSION & 0x07));    result[padding++] = (byte) (bl >>> 2);    // save number of bits, casting the long to an array of 8 bytes    long bits = count << 3;    result[padding++] = (byte) bits;    result[padding++] = (byte) (bits >>> 8);    result[padding++] = (byte) (bits >>> 16);    result[padding++] = (byte) (bits >>> 24);    result[padding++] = (byte) (bits >>> 32);    result[padding++] = (byte) (bits >>> 40);    result[padding++] = (byte) (bits >>> 48);    result[padding] = (byte) (bits >>> 56);    return result;  }