Code example for RSAPublicKey

Methods: getModulus

0
        } 
        else if (key instanceof RSAPublicKey)
        { 
            RSAPublicKey k = (RSAPublicKey)key;
 
            return k.getModulus().bitLength();
        } 
 
        throw new IllegalArgumentException("not an RSA key!");
    } 
 
    protected int engineGetOutputSize( 
        int     inputLen) 
    { 
        try 
        { 
            return cipher.getOutputBlockSize();
        } 
        catch (NullPointerException e)
        { 
            throw new IllegalStateException("RSA Cipher not initialised");