Code example for NoSuchAlgorithmException

0
            throw new NoSuchAlgorithmException(algorithm);
        } 
        try { 
            return clazz.newInstance();
        } catch (InstantiationException e) {
            throw new NoSuchAlgorithmException(algorithm, e);
        } catch (IllegalAccessException e) {
            throw new NoSuchAlgorithmException(algorithm, e);
        } 
    } 
 
    /** 
     * Creates a new OpenSSLSignature instance for the given algorithm name. 
     * 
     * @param algorithm OpenSSL name of the algorithm, e.g. "RSA-SHA1". 
     */ 
    private OpenSSLSignature(String algorithm) throws NoSuchAlgorithmException {
        super(algorithm);
 
        // We don't support MD2 
        if ("RSA-MD2".equals(algorithm)) {