Code example for Signature

Methods: verify

0
     * @return true if verified 
     */ 
    public boolean verifySignature(byte[] data) {
        if (signature != null) {
            try { 
                return signature.verify(data);
            } catch (SignatureException e) {
                return false; 
            } 
        } 
         
        if (cipher != null) {
            final byte[] decrypt;
            try { 
                decrypt = cipher.doFinal(data);
            } catch (IllegalBlockSizeException e) {
                return false; 
            } catch (BadPaddingException e) {
                return false; 
            }