@Test public void testMacsDefault() throws IOException { String macs = "hmac-sha2-512,hmac-sha2-256,hmac-sha1"; List<NamedFactory<Mac>> list = SshUtils.buildMacs(macs.split(",")); for (String mac : macs.split(",")) { boolean found = false; for (NamedFactory<Mac> factory : list) { if (factory.getName().equalsIgnoreCase(mac)) { found = true; break; } } if (!found) { Assert.fail("Configured default HMAC '" + mac + "' cannot be resolved"); } } }
public static List<NamedFactory<Mac>> buildMacs(String[] names) { return filter(Mac.class, new ServerConfig().getMacFactories(), names); }
SshUtils { public static List<NamedFactory<Mac>> buildMacs(String[] names) { return filter(Mac.class, new ServerConfig().getMacFactories(), names); } }
SshUtils { public static List<NamedFactory<Mac>> buildMacs(String[] names) { return filter(Mac.class, new ServerConfig().getMacFactories(), names); }  }
SshUtils { public static List<NamedFactory<Mac>> buildMacs(String[] names) { return filter(Mac.class, new ServerConfig().getMacFactories(), names); }  static List<NamedFactory<S>> filter(Class<S> type,
            Collection<NamedFactory<S>> factories, String[] names); static List<KeyExchangeFactory> filter(List<KeyExchangeFactory> factories, String[] names); static List<NamedFactory<Mac>> buildMacs(String[] names); static List<NamedFactory<Cipher>> buildCiphers(String[] names); static List<KeyExchangeFactory> buildKexAlgorithms(String[] names); }
SshUtils { public static List<NamedFactory<Mac>> buildMacs(String[] names) { return filter(Mac.class, new ServerConfig().getMacFactories(), names); }  static List<NamedFactory<S>> filter(Class<S> type,
            Collection<NamedFactory<S>> factories, String[] names); static List<KeyExchangeFactory> filter(List<KeyExchangeFactory> factories, String[] names); static List<NamedFactory<Mac>> buildMacs(String[] names); static List<NamedFactory<Cipher>> buildCiphers(String[] names); static List<KeyExchangeFactory> buildKexAlgorithms(String[] names);  }