Performs verification using the wrapped verification mode implementation.
Prepends the custom failure message if verification fails.
@param data the data to be verified
548927
@Override
    public void verify(VerificationData data) {
        try {
            verification.verify(data);

        } catch (MockitoAssertionError e) {
            throw new MockitoAssertionError(e, description);
        }
    }
1095280
private boolean validateEncryptionKeyData(KeyData data) {
        if (data.getIv().length != ENCRYPTIONKEYCHAINMANAGER_AES_IV_SIZE) {
            LOGGER.warning("IV does not have the expected size: " +
                    ENCRYPTIONKEYCHAINMANAGER_AES_IV_SIZE + " bytes");
            return false;
        }
        return true;
    }
735649
public void addData(final Data DATA) {
        sum += DATA.getValue();
        window.add(DATA);
        if (window.size() > numberPeriod) {
            sum -= window.remove().getValue();
        }
    }
827678
public function success($data = null) {
		$this->_status = static::STATUS_SUCCESS;
		$this->_code = 200;
		$this->_data = !$data && $data !== false ? null : $data;
	}
1148452
def verify_data(self, data):
        '''
        
        '''
        errors = []
        if 'state' not in data:
            errors.append('Missing "state" data')
        if 'fun' not in data:
            errors.append('Missing "fun" data')
        if 'name' not in data:
            errors.append('Missing "name" data')
        if data['name'] and not isinstance(data['name'], six.string_types):
            errors.append(
                'ID \'{0}\' {1}is not formed as a string, but is a {2}'.format(
                    data['name'],
                    'in SLS \'{0}\' '.format(data['__sls__'])
                        if '__sls__' in data else '',
                    type(data['name']).__name__
                )
            )
        if errors:
            return errors
        full = data['state'] + '.' + data['fun']
        if full not in self.states:
            if '__sls__' in data:
                errors.append(
                    'State \'{0}\' was not found in SLS \'{1}\''.format(
                        full,
                        data['__sls__']
                        )
                    )
                reason = self.states.missing_fun_string(full)
                if reason:
                    errors.append('Reason: {0}'.format(reason))
            else:
                errors.append(
                        'Specified state \'{0}\' was not found'.format(
                            full
                            )
                        )
        else:
            # First verify that the parameters are met
            aspec = salt.utils.args.get_function_argspec(self.states[full])
            arglen = 0
            deflen = 0
            if isinstance(aspec.args, list):
                arglen = len(aspec.args)
            if isinstance(aspec.defaults, tuple):
                deflen = len(aspec.defaults)
            for ind in range(arglen - deflen):
                if aspec.args[ind] not in data:
                    errors.append(
                        'Missing parameter {0} for state {1}'.format(
                            aspec.args[ind],
                            full
                        )
                    )
        # If this chunk has a recursive require, then it will cause a
        # recursive loop when executing, check for it
        reqdec = ''
        if 'require' in data:
            reqdec = 'require'
        if 'watch' in data:
            # Check to see if the service has a mod_watch function, if it does
            # not, then just require
            # to just require extend the require statement with the contents
            # of watch so that the mod_watch function is not called and the
            # requisite capability is still used
            if '{0}.mod_watch'.format(data['state']) not in self.states:
                if 'require' in data:
                    data['require'].extend(data.pop('watch'))
                else:
                    data['require'] = data.pop('watch')
                reqdec = 'require'
            else:
                reqdec = 'watch'
        if reqdec:
            for req in data[reqdec]:
                reqfirst = next(iter(req))
                if data['state'] == reqfirst:
                    if (fnmatch.fnmatch(data['name'], req[reqfirst])
                            or fnmatch.fnmatch(data['__id__'], req[reqfirst])):
                        err = ('Recursive require detected in SLS {0} for'
                               ' require {1} in ID {2}').format(
                                   data['__sls__'],
                                   req,
                                   data['__id__'])
                        errors.append(err)
        return errors
910446
protected void fail(String message) {
        failed = true;
        messageVector.add(new ValidationMessage(lastElementId, message));
    }
627973
private static Data checkData(final Data data) {
		if (Data.EMPTY.equals(data)) {
			throw new IllegalStateException("Argument 'data' must not be empty.");
		}
		return data;
	}
1037620
public void addIndex(ValidationData data) {
        for (ValidationDataIndex idx : this.idxs) {
            ValidationIndexUtil.addIndexData(data, idx);
        }
    }
466623
public void add(final D data)
	{
		this.container.add(data);

		// if the size of data is known add the value to the task size
		if (data instanceof ISizeable) {
			this.byteSize += ((ISizeable) data).byteSize();
		}
	}
1064349
public boolean check(ByteBuffer data)
    {
        assert (data != null);
        int size = data.limit();
        //  This function is on critical path. It deliberately doesn't use
        //  recursion to get a bit better performance.
        Trie current = this;
        int start = 0;
        while (true) {
            //  We've found a corresponding subscription!
            if (current.refcnt > 0) {
                return true;
            }

            //  We've checked all the data and haven't found matching subscription.
            if (size == 0) {
                return false;
            }

            //  If there's no corresponding slot for the first character
            //  of the prefix, the message does not match.
            byte c = data.get(start);
            if (c < current.min || c >= current.min + current.count) {
                return false;
            }

            //  Move to the next character.
            if (current.count == 1) {
                current = current.next[0];
            }
            else {
                current = current.next[c - current.min];
                if (current == null) {
                    return false;
                }
            }
            start++;
            size--;
        }
    }
1159360
protected boolean doBugLinkValidationPass(final ProcessorData processorData) {
        final ContentSpec contentSpec = processorData.getContentSpec();
        boolean valid = true;
        if (processingOptions.isValidateBugLinks() && contentSpec.isInjectBugLinks()) {
            // Find out if we should re-validate bug links
            boolean reValidateBugLinks = true;
            if (contentSpec.getId() != null) {
                ContentSpecWrapper contentSpecEntity = null;
                try {
                    contentSpecEntity = providerFactory.getProvider(ContentSpecProvider.class).getContentSpec(contentSpec.getId(),
                            contentSpec.getRevision());
                } catch (ProviderException e) {

                }

                // This shouldn't happen but if it does, then it'll be picked up in the postValidationContentSpec method
                if (contentSpecEntity != null) {
                    boolean weekPassed = false;
                    if (processingOptions.isDoBugLinkLastValidateCheck()) {
                        final PropertyTagInContentSpecWrapper lastValidated = contentSpecEntity.getProperty(
                                serverEntities.getBugLinksLastValidatedPropertyTagId());
                        final Date now = new Date();
                        final long then;
                        if (lastValidated != null && lastValidated.getValue() != null && lastValidated.getValue().matches("^[0-9]+$")) {
                            then = Long.parseLong(lastValidated.getValue());
                        } else {
                            then = 0L;
                        }

                        // Check that a week has passed
                        weekPassed = (then + WEEK_MILLI_SECS) <= now.getTime();
                    } else {
                        weekPassed = true;
                    }

                    if (!weekPassed) {
                        // A week hasn't passed so check to see if anything has changed
                        boolean changed = false;
                        final String bugLinksValue = contentSpec.getBugLinksActualValue() == null ? null : contentSpec
                                .getBugLinksActualValue().toString();
                        if (EntityUtilities.hasContentSpecMetaDataChanged(CommonConstants.CS_BUG_LINKS_TITLE, bugLinksValue,
                                contentSpecEntity)) {
                            changed = true;
                        } else {
                            BugLinkType bugLinkType = null;
                            BugLinkOptions bugOptions = null;
                            if (contentSpec.getBugLinks() == BugLinkType.JIRA) {
                                bugLinkType = BugLinkType.JIRA;
                                bugOptions = contentSpec.getJIRABugLinkOptions();
                            } else {
                                bugLinkType = BugLinkType.BUGZILLA;
                                bugOptions = contentSpec.getBugzillaBugLinkOptions();
                            }
                            final BaseBugLinkStrategy bugLinkStrategy = BugLinkStrategyFactory.getInstance().create(bugLinkType,
                                    bugOptions.getBaseUrl());

                            if (bugLinkType != null && bugLinkStrategy.hasValuesChanged(contentSpecEntity, bugOptions)) {
                                changed = true;
                            }
                        }

                        // If the content hasn't changed then don't re-validate the bug links
                        if (!changed) {
                            reValidateBugLinks = false;
                        }
                    }
                }
            }

            // Validate the bug links
            if (reValidateBugLinks) {
                processorData.setBugLinksReValidated(reValidateBugLinks);
                LOG.info("Starting bug link validation pass...");
                if (!validator.postValidateBugLinks(contentSpec, processingOptions.isStrictBugLinks())) {
                    valid = false;
                }
            }
        }

        return valid;
    }
177328
function lomValidData(lomp, data)
{
	var k, i;

	mod_assert.ok(data.hasOwnProperty('results'));
	mod_assert.ok(Array.isArray(data.results));
	mod_assert.bool(data.done);

	if (data.done === false)
		mod_assert.ok(data.results.length > 0 ||
		    lomp.lom_pushed > 0);

	for (k in data) {
		if (!data.hasOwnProperty(k))
			continue;
		for (i = 0; i < LOM_RES_KEYS.length; i++) {
			if (LOM_RES_KEYS[i] === k)
				break;
		}

		mod_assert.ok(i < LOM_RES_KEYS.length,
		    sprintf('unknown result key: %s', k));
	}
}
730780
private void verifyWork(Work work) throws WorkException
   {
      Class<? extends Work> workClass = work.getClass();
      String className = workClass.getName();

      if (!validatedWork.contains(className))
      {

         if (isWorkMethodSynchronized(workClass, RUN_METHOD_NAME))
            throw new WorkException(bundle.runMethodIsSynchronized(className));

         if (isWorkMethodSynchronized(workClass, RELEASE_METHOD_NAME))
            throw new WorkException(bundle.releaseMethodIsSynchronized(className));

         validatedWork.add(className);
      }
   }
533820
protected void buildData(String[] data, boolean validateOnly) {

        if (data == null) {
            return;
        }

        int length = data.length;

        for (int i = 0; i < length; i++) {
            addAddressToList(data[i], validateOnly);
        }

    }
192272
public static boolean verify(byte[] data, byte[] signature, byte[] pub) {
        return verify(data, ECDSASignature.decodeFromDER(signature), pub);
    }
568218
function PushDataValidator(data) {
  MessagingUserStatus.call(this, 'push validator');

  if(data.deviceType != "ios" && data.deviceType != "android") {
    // Device type specification is invalid
    this.state.code = this.StatusCodes.INVALID;
    this.state.message = 'Invalid device type: ' + data.deviceType;

  } else if(!helpers.validateMessage(data.deviceToken)) {
    // Device token is invalid
    this.state.code = this.StatusCodes.INVALID;
    this.state.message = 'Invalid device token: ' + data.deviceToken;

  } else if(!helpers.validateMessage(data.message)) {
    // Message string is invalid
    this.state.code = this.StatusCodes.INVALID;
    this.state.message = 'Invalid message: ' + data.message;

  } else {
    // Input data is valid
    this.state.code = this.StatusCodes.VALID;
    this.state.message = 'Ok';
  }
}
562140
public void verify(PublicKey key, Provider sigProvider)
            throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException {
        unwrap().verify(key, sigProvider);
    }