Code example for RSAPublicKeySpec

Methods: getPublicExponent

0
     * Test for <code>getPublicExponent()</code> method<br> 
     * Assertion: returns public exponent 
     */ 
    public final void testGetPublicExponent() { 
        RSAPublicKeySpec rpks =
            new RSAPublicKeySpec(BigInteger.valueOf(3L),
                                 BigInteger.valueOf(1234567890L));
        assertTrue(BigInteger.valueOf(1234567890L).equals(rpks.getPublicExponent()));
    } 
 
}