Here you can find the source of getKeyFactory(final String algorithm)
private static KeyFactory getKeyFactory(final String algorithm) throws NoSuchAlgorithmException
//package com.java2s; //License from project: Apache License import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; public class Main { private static KeyFactory getKeyFactory(final String algorithm) throws NoSuchAlgorithmException { return KeyFactory.getInstance(algorithm); }//from w ww . ja v a 2s. co m }