@Override
public String calculateIBMPINOffset(EncryptedPIN pinUnderKd1, SecureDESKey kd1,
SecureDESKey pvk, String decTab, String pinValData, int minPinLen,
List<String> excludes) throws SMException {
List<Loggeable> cmdParameters = new ArrayList<Loggeable>();
cmdParameters.add(new SimpleMsg("parameter", "account number", pinUnderKd1.getAccountNumber()));
cmdParameters.add(new SimpleMsg("parameter", "PIN under Data Key 1", pinUnderKd1));
cmdParameters.add(new SimpleMsg("parameter", "Data Key 1", kd1));
cmdParameters.add(new SimpleMsg("parameter", "PVK", pvk));
cmdParameters.add(new SimpleMsg("parameter", "decimalisation table", decTab));
cmdParameters.add(new SimpleMsg("parameter", "PIN validation data", pinValData));
cmdParameters.add(new SimpleMsg("parameter", "minimum PIN length", minPinLen));
if(excludes != null && !excludes.isEmpty())
cmdParameters.add(new SimpleMsg("parameter", "Excluded PINs list", excludes));
LogEvent evt = new LogEvent(this, "s-m-operation");
evt.addMessage(new SimpleMsg("command", "Calculate PIN offset", cmdParameters.toArray(new Loggeable[cmdParameters.size()])));
String result = null;
try {
result = calculateIBMPINOffsetImpl(pinUnderKd1, kd1, pvk,
decTab, pinValData, minPinLen, excludes);
evt.addMessage(new SimpleMsg("result", "Calculated PIN offset", result));
} catch (Exception e) {
evt.addMessage(e);
throw e instanceof SMException ? (SMException) e : new SMException(e);
} finally {
Logger.log(evt);