16 const std::string keypath_str(buffer.begin(), buffer.end());
17 std::vector<uint32_t> keypath;
21 const std::vector<uint32_t> random_keypath = ConsumeRandomLengthIntegralVector<uint32_t>(
fuzzed_data_provider);
24 for (
const bool apostrophe : {
false,
true}) {
25 std::vector<uint32_t> roundtrip;
26 const std::string written{
WriteHDKeypath(random_keypath, apostrophe)};
28 assert(roundtrip == random_keypath);
bool ParseHDKeypath(const std::string &keypath_str, std::vector< uint32_t > &keypath)
Parse an HD keypaths like "m/7/0'/2000".
std::string WriteHDKeypath(const std::vector< uint32_t > &keypath, bool apostrophe)
Write HD keypaths as strings.
FUZZ_TARGET(parse_hd_keypath)
FuzzedDataProvider & fuzzed_data_provider