/*
* Class under test for boolean verify(byte[], int, int)
*/
public void testVerifybyteArrayintint() throws Exception {
MySignature1 s = new MySignature1("ABC");
byte[] b = {1, 2, 3, 4};
try {
s.verify(b, 0, 3);
fail("No expected SignatureException");
} catch (SignatureException e) {
}
s.initSign(new MyPrivateKey());
try {
s.verify(b, 0, 3);
fail("No expected SignatureException");
} catch (SignatureException e) {
}
s.initVerify(new MyPublicKey());
try {
s.verify(b, 0, 5);
fail("No expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
}
s.verify(b, 0, 3);
assertEquals("state", Signature.VERIFY, s.getState());
assertTrue("verify() failed", s.runEngineVerify);
}