docs: public static byte[] copyWithLength(byte[] orig, int length) {
      // No need to initialize with zero bytes, because the bytes are already initialized with that
      byte[] result = new byte[length];
      int howMuchToCopy = length < orig.length ? length : orig.length;
      System.arraycopy(orig, 0, result, 0, howMuchToCopy);
      return result;
    }