Code example for Signature

Methods: verify

0
    public final void testVerifybyteArrayintint02() throws Exception { 
 
        byte sigBytes[] = new byte[100]; // wrong signature
 
        try { 
            verifyingSign.verify(sigBytes, Integer.MAX_VALUE, 2);
            fail("testcase1 : no SignatureException");
        } catch (SignatureException e) {}
 
        try { 
            verifyingSign.verify(sigBytes, 2, Integer.MAX_VALUE);
            fail("testcase2 : no SignatureException");
        } catch (SignatureException e) {}
 
        verifyingSign.update(message);
        try { 
            verifyingSign.verify(sigBytes, 0, 50);
            fail("testcase3 : SignatureException");
        } catch (SignatureException e) {}
    } 
 
    /**