{
if (!(params instanceof RSAKeyGenParameterSpec))
{
throw new InvalidAlgorithmParameterException("parameter object not a RSAKeyGenParameterSpec");
}
RSAKeyGenParameterSpec rsaParams = (RSAKeyGenParameterSpec)params;
param = new RSAKeyGenerationParameters(
rsaParams.getPublicExponent(),
random, rsaParams.getKeysize(), defaultTests);
engine.init(param);
}