@Test public void testCiphersDefault() throws IOException { String ciphers = "aes128-ctr,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc"; List<NamedFactory<Cipher>> list = SshUtils.buildCiphers(ciphers.split(",")); for (String cipher : ciphers.split(",")) { boolean found = false; for (NamedFactory<Cipher> factory : list) { if (factory.getName().equalsIgnoreCase(cipher)) { found = true; break; } } if (!found) { Assert.fail("Configured default cipher '" + cipher + "' cannot be resolved"); } } }
public static List<NamedFactory<Cipher>> buildCiphers(String[] names) { ServerConfig defaults = new ServerConfig(); List<NamedFactory<Cipher>> avail = defaults.getCipherFactories(); return filter(Cipher.class, avail, names); }
SshUtils { public static List<NamedFactory<Cipher>> buildCiphers(String[] names) { ServerConfig defaults = new ServerConfig(); List<NamedFactory<Cipher>> avail = defaults.getCipherFactories(); return filter(Cipher.class, avail, names); } }
SshUtils { public static List<NamedFactory<Cipher>> buildCiphers(String[] names) { ServerConfig defaults = new ServerConfig(); List<NamedFactory<Cipher>> avail = defaults.getCipherFactories(); return filter(Cipher.class, avail, names); }  }
SshUtils { public static List<NamedFactory<Cipher>> buildCiphers(String[] names) { ServerConfig defaults = new ServerConfig(); List<NamedFactory<Cipher>> avail = defaults.getCipherFactories(); return filter(Cipher.class, avail, 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<Cipher>> buildCiphers(String[] names) { ServerConfig defaults = new ServerConfig(); List<NamedFactory<Cipher>> avail = defaults.getCipherFactories(); return filter(Cipher.class, avail, 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);  }