* Simple helper to find the location of the given authorized key in the authorized keys. * @param authorized_keys The keys to look through. * @param authorized_key The key to look for. * @return The iterator to the location of the authorized key, or \c authorized_keys.end(). */
| 168 | * @return The iterator to the location of the authorized key, or \c authorized_keys.end(). |
| 169 | */ |
| 170 | static auto FindKey(auto *authorized_keys, std::string_view authorized_key) |
| 171 | { |
| 172 | return std::ranges::find_if(*authorized_keys, [authorized_key](auto &value) { return StrEqualsIgnoreCase(value, authorized_key); }); |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Check whether the given key is contains in these authorized keys. |
no test coverage detected