Code example for Signature

Methods: updateverify

0
     * @return true if verified 
     */ 
    public boolean verifySignature(byte[] data) {
        if (signature != null) {
            try { 
                signature.update(sha_hash);
                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;