Here you can find the source of getKeyFactory()
private static KeyFactory getKeyFactory() throws NoSuchAlgorithmException, NoSuchProviderException
//package com.java2s; //License from project: Apache License import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; public class Main { private static KeyFactory getKeyFactory() throws NoSuchAlgorithmException, NoSuchProviderException { KeyFactory keyFactory = KeyFactory.getInstance("RSA"); return keyFactory; }/*from w w w. j ava 2s .c o m*/ }