OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #ifndef CRASHPAD_HANDLER_HANDLER_MAIN_H_ | 15 #ifndef CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
16 #define CRASHPAD_HANDLER_HANDLER_MAIN_H_ | 16 #define CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
| 17 |
| 18 #include <string> |
17 | 19 |
18 namespace crashpad { | 20 namespace crashpad { |
19 | 21 |
20 //! \brief The `main()` of the `crashpad_handler` binary. | 22 //! \brief Returns a random string. |
21 //! | 23 //! |
22 //! This is exposed so that `crashpad_handler` can be embedded into another | 24 //! The string consists of 16 uppercase characters chosen at random. The |
23 //! binary, but called and used as if it were a standalone executable. | 25 //! returned string has over 75 bits of randomness (26<sup>16</sup> > |
24 int HandlerMain(int argc, char* argv[]); | 26 //! 2<sup>75</sup>). |
| 27 std::string RandomString(); |
25 | 28 |
26 } // namespace crashpad | 29 } // namespace crashpad |
27 | 30 |
28 #endif // CRASHPAD_HANDLER_HANDLER_MAIN_H_ | 31 #endif // CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
OLD | NEW |