Thrown by the transport protocol if an algorithm is not supported by the underlying JCE.
157158159160161162163164165
public static SshKeyPair newInstance(String methodName) throws AlgorithmNotSupportedException { try { return (SshKeyPair) ((Class) pks.get(methodName)).newInstance(); } catch (Exception e) { throw new AlgorithmNotSupportedException(methodName + " is not supported!"); } }
194195196197198199200201202203204
if (supportsKey(algorithm)) { SshKeyPair pair = newInstance(algorithm); return pair.decodePrivateKey(encoded); } else { throw new AlgorithmNotSupportedException(algorithm + " is not supported"); } } catch (IOException ioe) { throw new InvalidSshKeyException(ioe.getMessage()); }
223224225226227228229230231232233
if (supportsKey(algorithm)) { SshKeyPair pair = newInstance(algorithm); return pair.decodePublicKey(encoded); } else { throw new AlgorithmNotSupportedException(algorithm + " is not supported"); } } catch (IOException ioe) { throw new InvalidSshKeyException(ioe.getMessage()); }
151152153154155156157158159
public static SshKeyExchange newInstance(String methodName) throws AlgorithmNotSupportedException { try { return (SshKeyExchange) ((Class) kexs.get(methodName)).newInstance(); } catch (Exception e) { throw new AlgorithmNotSupportedException(methodName + " is not supported!"); } }
120121122123124125126127
try { dhKeyPairGen = KeyPairGenerator.getInstance("DH"); dhKeyAgreement = KeyAgreement.getInstance("DH"); } catch (NoSuchAlgorithmException ex) { throw new AlgorithmNotSupportedException(ex.getMessage()); } }
105106107108109110111112113
public static SshHmac newInstance(String methodName) throws AlgorithmNotSupportedException { try { return (SshHmac) ((Class) macs.get(methodName)).newInstance(); } catch (Exception e) { throw new AlgorithmNotSupportedException(methodName + " is not supported!"); } }
156157158159160161162163164
log.info("Creating new " + algorithmName + " cipher instance"); try { return (SshCipher) ((Class) ciphers.get(algorithmName)).newInstance(); } catch (Throwable t) { throw new AlgorithmNotSupportedException(algorithmName + " is not supported!"); } }
166167168169170171172173174
public static SshAuthenticationClient newInstance(String methodName) throws AlgorithmNotSupportedException { try { return (SshAuthenticationClient) ((Class) auths.get(methodName)).newInstance(); } catch (Exception e) { throw new AlgorithmNotSupportedException(methodName + " is not supported!"); } }
155156157158159160161162163
return null; } else { return (SshCompression) ((Class) comps.get(algorithmName)).newInstance(); } } catch (Exception e) { throw new AlgorithmNotSupportedException(algorithmName + " is not supported!"); } }
143144145146147148149150151
public static SshAuthenticationServer newInstance(String methodName) throws AlgorithmNotSupportedException { try { return (SshAuthenticationServer) ((Class) auths.get(methodName)).newInstance(); } catch (Exception e) { throw new AlgorithmNotSupportedException(methodName + " is not supported!"); } }