23 std::istringstream
input(fp);
24 input.setf(std::ios_base::hex, std::ios_base::basefield);
25 input.unsetf(std::ios_base::skipws);
29 if (
input >> val && val < 256)
36 if (
input >> sep >> val && sep ==
':' && val < 256)
44 throw option_error(ERR_INVALID_OPTION_VAL,
"malformed peer-fingerprint: " + fp);
57 std::string
str()
const
59 std::ostringstream output;
60 output.setf(std::ios_base::hex, std::ios_base::basefield);
67 std::string
str(output.str());
90 if (indices ==
nullptr)
93 for (
const auto i : *indices)
99 while (std::getline(fps, fp))
119 if (fingerprint == fp)
126 explicit operator bool()
const IndexList * get_index_ptr(const std::string &name) const
void touch(const std::string &name) const
bool starts_with(const STRING &str, const std::string &prefix)
std::string trim_copy(const std::string &str)
bool operator==(const PeerFingerprint &that) const
std::vector< uint8_t > fingerprint_
PeerFingerprint(const std::string &fp, const std::size_t size)
PeerFingerprint(const std::vector< uint8_t > &fingerprint)
PeerFingerprints(const OptionList &opt, const std::size_t fp_size)
std::vector< PeerFingerprint > fingerprints_
PeerFingerprints()=default
bool match(const PeerFingerprint &fp) const
static const char * input[]