docs: public static PublicKey generatePublicKey(final PrivateKey privateKey)
  		throws NoSuchAlgorithmException, InvalidKeySpecException
  	{
  		if (privateKey instanceof RSAPrivateKey)
  		{
  			final RSAPrivateCrtKey privk = (RSAPrivateCrtKey)privateKey;
  			final RSAPublicKeySpec publicKeySpec = new RSAPublicKeySpec(privk.getModulus(),
  				privk.getPublicExponent());
  
  			final KeyFactory keyFactory = KeyFactory
  				.getInstance(KeyPairGeneratorAlgorithm.RSA.getAlgorithm());
  			final PublicKey publicKey = keyFactory.generatePublic(publicKeySpec);
  			return publicKey;
  		}
  		return null;
  	}