Index: util/misc/random_string.h |
diff --git a/handler/handler_main.h b/util/misc/random_string.h |
similarity index 63% |
copy from handler/handler_main.h |
copy to util/misc/random_string.h |
index 5b5568ecde6085e7f5ec680a8e0ec85d80964547..93b3a7fa4620f149529c8af1e9b067b9a81ca4a4 100644 |
--- a/handler/handler_main.h |
+++ b/util/misc/random_string.h |
@@ -12,17 +12,20 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#ifndef CRASHPAD_HANDLER_HANDLER_MAIN_H_ |
-#define CRASHPAD_HANDLER_HANDLER_MAIN_H_ |
+#ifndef CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
+#define CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
+ |
+#include <string> |
namespace crashpad { |
-//! \brief The `main()` of the `crashpad_handler` binary. |
+//! \brief Returns a random string. |
//! |
-//! This is exposed so that `crashpad_handler` can be embedded into another |
-//! binary, but called and used as if it were a standalone executable. |
-int HandlerMain(int argc, char* argv[]); |
+//! The string consists of 16 uppercase characters chosen at random. The |
+//! returned string has over 75 bits of randomness (26<sup>16</sup> > |
+//! 2<sup>75</sup>). |
+std::string RandomString(); |
} // namespace crashpad |
-#endif // CRASHPAD_HANDLER_HANDLER_MAIN_H_ |
+#endif // CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |