Here you can find the source of getKeyExchangeCipher()
public static Cipher getKeyExchangeCipher()
//package com.java2s; //License from project: Apache License import javax.crypto.*; import java.security.NoSuchAlgorithmException; public class Main { /**//from w w w . j a v a 2 s. c o m * Defines the algorithm to use for key exchange. */ public static final String ALGORITHM_KEY_EXCHANGE = "RSA"; /** * Defines the key exchange algorithm settings. */ public static final String ALGORITHM_KEY_EXCHANGE_SETTINGS = ""; /** * Returns the key exchange cipher. * @return */ public static Cipher getKeyExchangeCipher() { try { return Cipher.getInstance(getKeyExchangeCiperName()); } catch (NoSuchAlgorithmException ex) { return null; } catch (NoSuchPaddingException ex) { return null; } } /** * Returns the complete cipher name for the key exchange algorithm. * @return */ protected static String getKeyExchangeCiperName() { return ALGORITHM_KEY_EXCHANGE + ALGORITHM_KEY_EXCHANGE_SETTINGS; } }