throw new IllegalArgumentException(
"VMPC init parameters must include an IV");
}
ParametersWithIV ivParams = (ParametersWithIV) params;
KeyParameter key = (KeyParameter) ivParams.getParameters();
if (!(ivParams.getParameters() instanceof KeyParameter))
{
throw new IllegalArgumentException(
"VMPC init parameters must include a key");
}
this.workingIV = ivParams.getIV();
if (workingIV == null || workingIV.length < 1 || workingIV.length > 768)
{
throw new IllegalArgumentException("VMPC requires 1 to 768 bytes of IV");
}
this.workingKey = key.getKey();
initKey(this.workingKey, this.workingIV);
}