data = eng.generateSignature();
}
catch (Exception e)
{
return new SimpleTestResult(false, "ISO9796: failed - exception " + e.toString());
}
eng.init(false, pubParameters);
if (!isSameAs(sig7, 0, data))
{
return new SimpleTestResult(false, "ISO9796: failed ISO9796-2 generation Test 7");
}
eng.update(msg7[0]);
eng.update(msg7, 1, msg7.length - 1);
if (!eng.verifySignature(sig7))
{
return new SimpleTestResult(false, "ISO9796: failed ISO9796-2 verify Test 7");
}
if (!isSameAs(msg7, 0, eng.getRecoveredMessage()))
{
return new SimpleTestResult(false, "ISO9796: failed ISO9796-2 recovery Test 7");
}
return new SimpleTestResult(true, "ISO9796: Okay");
}