Code example for RSAKeyGenParameterSpec

0
            emSpi.engineInit(key);
            fail("ExemptionMechanismException must be thrown");
        } catch (ExemptionMechanismException e) {
        } 
        try { 
            emSpi.engineInit(key, params);
            fail("ExemptionMechanismException must be thrown");
        } catch (ExemptionMechanismException e) {
        } 
        try { 
            emSpi.engineInit(key, parSpec);
            fail("ExemptionMechanismException must be thrown");
        } catch (ExemptionMechanismException e) {
        } 
        key = ((MyExemptionMechanismSpi)emSpi).new tmpKey("Proba", new byte[0]);
        emSpi.engineInit(key);
        emSpi.engineInit(key, AlgorithmParameters.getInstance("DH"));
        emSpi.engineInit(key, new RSAKeyGenParameterSpec(10, new BigInteger ("10")));
         
        assertEquals("Incorrect result", 10, emSpi.engineGetOutputSize(100));
    }