public KeyPair toRSA ( boolean includePrivateParameters , Provider provider ) { // Must be RSA checkRSACompatible ( ) ; if ( includePrivateParameters ) { return new KeyPair ( getRSAPublicKey ( provider ) , getRSAPrivateKey ( provider ) ) ; } else { return new KeyPair ( getRSAPublicKey ( provider ) , null ) ; } }
Converts JSON web key to RSA key pair and include the private key if set to true .