private byte[] pad(final byte[] data) {
    if (data.length == BLOCK_SIZE_IN_BYTES) {
      return xor(data, b);
    } else {
      byte[] res = Arrays.copyOf(p, BLOCK_SIZE_IN_BYTES);
      for (int i = 0; i < data.length; i++) {
        res[i] ^= data[i];
      }
      res[data.length] = (byte) (res[data.length] ^ 0x80);
      return res;
    }
  }
Pads the last block for OMAC. If the last block is smaller than 16 bytes then a bitstring
starting with 1 and followed by 0's is appended and the result is XORed with p. If the last
block is 16 bytes long then the last block is XORed with b.

@param data A block or partial block of size 1 .. 16 bytes.
@return The padded block.
java_src/src/main/java/com/google/crypto/tink/subtle/AesEaxJce.java