code: 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);
          }
      }
docs: Converts JSON web key to RSA key pair and include the private key if set to
  true.
  
  @param provider
  the Java security provider.
  @param includePrivateParameters
  true if the RSA key pair should include the private key. False
  otherwise.
  @return RSA key pair