code:     public static int log2(int n)
      {
          int log = 0;
          while ((n >>= 1) != 0)
          {
              log++;
          }
          return log;
      }
  
      /**
       * Convert int/long to n-byte array.
       *
       * @param value      int/long value.
       * @param sizeInByte Size of byte array in byte.
       * @return int/long as big-endian byte array of size {@code sizeInByte}.
       */
  