public static boolean verifyDiscoverInfoVersion(String ver, String hash, DiscoverInfo info) {
        // step 3.3 check for duplicate identities
        if (info.containsDuplicateIdentities())
            return false;

        // step 3.4 check for duplicate features
        if (info.containsDuplicateFeatures())
            return false;

        // step 3.5 check for well-formed packet extensions
        if (verifyPacketExtensions(info))
            return false;

        String calculatedVer = generateVerificationString(info, hash).version;

        if (!ver.equals(calculatedVer))
            return false;

        return true;
    }
public static boolean verifyDiscoverInfoVersion ( String ver , String hash , DiscoverInfo info ) { if ( info . containsDuplicateIdentities ( ) ) return false ; if ( info . containsDuplicateFeatures ( ) ) return false ; if ( verifyPacketExtensions ( info ) ) return false ; String calculatedVer = generateVerificationString ( info , hash ) . version ; if ( ! ver . equals ( calculatedVer ) ) return false ; return true ; }
Verify DiscoverInfo and Caps Node as defined in XEP-0115 5.4 Processing
Method.

@see <a href="http://xmpp.org/extensions/xep-0115.html#ver-proc">XEP-0115
5.4 Processing Method</a>

@param ver
@param hash
@param info
@return true if it's valid and should be cache, false if not