MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ExtractIdentHashes

Function ExtractIdentHashes

libi2pd/Identity.cpp:20–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace data
19{
20 std::vector<IdentHash> ExtractIdentHashes (std::string_view hashes)
21 {
22 std::vector<IdentHash> idents;
23 if (!hashes.empty ())
24 {
25 size_t pos = 0, comma;
26 do
27 {
28 comma = hashes.find (',', pos);
29 i2p::data::IdentHash ident;
30 if (ident.FromBase64 (hashes.substr (pos, comma != std::string_view::npos ? comma - pos : std::string_view::npos)))
31 idents.push_back (ident);
32 pos = comma + 1;
33 }
34 while (comma != std::string_view::npos);
35 }
36 return idents;
37 }
38
39 Identity& Identity::operator=(const Keys& keys)
40 {

Callers 2

initMethod · 0.85
LeaseSetDestinationMethod · 0.85

Calls 2

FromBase64Method · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected