| 18 | namespace 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 | { |
no test coverage detected