private static void keccakPad() {
        if ((bitsInQueue % 8) != 0) {
            // The bits are numbered from 0=LSB to 7=MSB
            byte padByte = (byte) (1 << (bitsInQueue % 8));
            dataQueue[bitsInQueue / 8] |= padByte;
            bitsInQueue += 8 - (bitsInQueue % 8);
        } else {
            dataQueue[bitsInQueue / 8] = 0x01;
            bitsInQueue += 8;
        }
        if (bitsInQueue == rate) {
            absorbQueue();
        }
        dataQueue[bitsInQueue / 8] = diversifier;
        bitsInQueue += 8;
        if (bitsInQueue == rate) {
            absorbQueue();
        }
        dataQueue[bitsInQueue / 8] = (byte) (rate / 8);
        bitsInQueue += 8;
        if (bitsInQueue == rate) {
            absorbQueue();
        }
        dataQueue[bitsInQueue / 8] = 0x01;
        bitsInQueue += 8;
        if (bitsInQueue > 0) {
            absorbQueue();
        }
        System.arraycopy(state, 0, dataQueue, 0, rate / 8);
    }