boolean forEncryption,
CipherParameters params)
{
if (params instanceof ParametersWithSBox)
{
ParametersWithSBox param = (ParametersWithSBox)params;
//
// Set the S-Box
//
System.arraycopy(param.getSBox(), 0, this.S, 0, param.getSBox().length);
//
// set key if there is one
//
if (param.getParameters() != null)
{
workingKey = generateWorkingKey(forEncryption,
((KeyParameter)param.getParameters()).getKey());
}
}
else if (params instanceof KeyParameter)
{
workingKey = generateWorkingKey(forEncryption,