1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef QUICHE_HTTP2_TEST_TOOLS_RANDOM_UTIL_H_ 6 #define QUICHE_HTTP2_TEST_TOOLS_RANDOM_UTIL_H_ 7 8 #include <stddef.h> 9 10 #include <string> 11 12 #include "quiche/http2/test_tools/http2_random.h" 13 14 namespace http2 { 15 namespace test { 16 17 // Generate a string with the allowed character set for HTTP/2 / HPACK header 18 // names. 19 std::string GenerateHttp2HeaderName(size_t len, Http2Random* rng); 20 21 // Generate a string with the web-safe string character set of specified len. 22 std::string GenerateWebSafeString(size_t len, Http2Random* rng); 23 24 // Generate a string with the web-safe string character set of length [lo, hi). 25 std::string GenerateWebSafeString(size_t lo, size_t hi, Http2Random* rng); 26 27 } // namespace test 28 } // namespace http2 29 30 #endif // QUICHE_HTTP2_TEST_TOOLS_RANDOM_UTIL_H_ 31