Here you can find the source of getKeyFactory(String keyType)
static private KeyFactory getKeyFactory(String keyType) throws NoSuchAlgorithmException
//package com.java2s; /*//from w w w . j a va2s. c o m * Copyright 2014-2017. * Distributed under the terms of the GPLv3 License. * * Authors: * Clemens Zeidler <czei002@aucklanduni.ac.nz> */ import java.security.*; public class Main { static private KeyFactory getKeyFactory(String keyType) throws NoSuchAlgorithmException { if (keyType.startsWith("EC")) { return KeyFactory.getInstance("EC"); } else { return KeyFactory.getInstance(keyType); } } }