Code example for RSAKeyGenParameterSpec

0
     * Assertion: constructs <code>RSAKeyGenParameterSpec</code> 
     * object using valid parameters 
     */ 
    public final void testRSAKeyGenParameterSpec() { 
        AlgorithmParameterSpec aps =
            new RSAKeyGenParameterSpec(512, BigInteger.valueOf(0L));
        assertTrue(aps instanceof RSAKeyGenParameterSpec);
    } 
 
    /** 
     * Test for <code>getKeySize()</code> method<br> 
     * Assertion: returns key size value 
     */ 
    public final void testGetKeysize() { 
        RSAKeyGenParameterSpec rkgps =
            new RSAKeyGenParameterSpec(512, BigInteger.valueOf(0L));
        assertEquals(512, rkgps.getKeysize());
    } 
 
    /** 
     * Test for <code>getPublicExponent()</code> method<br>