/** * Get all discovered compression algorithms. This is determine by examining * all providers for their algorithms and producing a unique list. * * @return all compression algorithms */ public static String[] getAllCompression() { List comp = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedCompression(); addList(comp, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) comp.toArray(new String[0]); }
/** * Get all discovered public key algorithms. This is determine by examining * all providers for their algorithms and producing a unique list. * * @return all public key algorithms */ public static String[] getAllPublicKey() { List pk = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedPublicKey(); addList(pk, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) pk.toArray(new String[0]); }
/** * Get all discovered ciphers. This is determine by examining all providers * for their ciphers and producing a unique list. * * @return all ciphers */ public static String[] getAllCiphers() { List ciphers = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i] .getSupportedCiphers(SshConfiguration.SSH1_OR_SSH2); addList(ciphers, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) ciphers.toArray(new String[0]); }
/** * Get all discovered message authentication code algorithms. This is * determine by examining all providers for their algorithms and producing a * unique list. * * @return all message authentication code algorithms */ public static String[] getAllMAC() { List mac = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedMAC(); addList(mac, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) mac.toArray(new String[0]); }
/** * Get all discovered ciphers. This is determine by examining all providers * for their ciphers and producing a unique list. * * @return all ciphers */ public static String[] getAllCiphers() { List ciphers = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i] .getSupportedCiphers(SshConfiguration.SSH1_OR_SSH2); addList(ciphers, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) ciphers.toArray(new String[0]); }
/** * Get all discovered key exchange algorithms. This is determine by * examining all providers for their algorithms and producing a unique list. * * @return all key exchange algorithms */ public static String[] getAllKEX() { List kex = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedKeyExchange(); addList(kex, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) kex.toArray(new String[0]); }
/** * Get all discovered compression algorithms. This is determine by examining * all providers for their algorithms and producing a unique list. * * @return all compression algorithms */ public static String[] getAllCompression() { List comp = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedCompression(); addList(comp, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) comp.toArray(new String[0]); }
/** * Get all discovered key exchange algorithms. This is determine by * examining all providers for their algorithms and producing a unique list. * * @return all key exchange algorithms */ public static String[] getAllKEX() { List kex = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedKeyExchange(); addList(kex, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) kex.toArray(new String[0]); }
/** * Get all discovered public key algorithms. This is determine by examining * all providers for their algorithms and producing a unique list. * * @return all public key algorithms */ public static String[] getAllPublicKey() { List pk = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedPublicKey(); addList(pk, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) pk.toArray(new String[0]); }
/** * Get all discovered message authentication code algorithms. This is * determine by examining all providers for their algorithms and producing a * unique list. * * @return all message authentication code algorithms */ public static String[] getAllMAC() { List mac = new ArrayList(); SshProvider[] providers = getAllProviders(); for (int i = 0; i < providers.length; i++) { try { List c = providers[i].getSupportedMAC(); addList(mac, c); } catch (UnsatisfiedLinkError ule) { System.out .println("WARNING: Provider requires a native library but it could not be found." + ule.getMessage()); } catch (Exception ex) { System.out.println("WARNING: Provider failed to load. " + ex.getMessage()); ex.printStackTrace(); } } return (String[]) mac.toArray(new String[0]); }