Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
parse_hd_keypath.cpp
Go to the documentation of this file.
1// Copyright (c) 2009-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
6#include <test/fuzz/fuzz.h>
7#include <test/fuzz/util.h>
8#include <util/bip32.h>
9
10#include <cstdint>
11#include <vector>
12
14{
15 const std::string keypath_str(buffer.begin(), buffer.end());
16 std::vector<uint32_t> keypath;
18
19 FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
21 (void)FormatHDKeypath(random_keypath, /*apostrophe=*/true); // WriteHDKeypath calls this with false
23}
bool ParseHDKeypath(const std::string &keypath_str, std::vector< uint32_t > &keypath)
Parse an HD keypaths like "m/7/0'/2000".
Definition bip32.cpp:13
std::string FormatHDKeypath(const std::vector< uint32_t > &path, bool apostrophe)
Definition bip32.cpp:51
std::string WriteHDKeypath(const std::vector< uint32_t > &keypath, bool apostrophe)
Write HD keypaths as strings.
Definition bip32.cpp:61
#define FUZZ_TARGET(...)
Definition fuzz.h:35
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73
FuzzedDataProvider & fuzzed_data_provider
Definition fees.cpp:38