예제 #1
0
        // Token: 0x06002AD1 RID: 10961 RVA: 0x0009EEE4 File Offset: 0x0009D0E4
        bool IReportMatchMembershipCondition.Check(Evidence evidence, out object usedEvidence)
        {
            usedEvidence = null;
            if (evidence == null)
            {
                return(false);
            }
            Hash hostEvidence = evidence.GetHostEvidence <Hash>();

            if (hostEvidence != null)
            {
                if (this.m_value == null && this.m_element != null)
                {
                    this.ParseHashValue();
                }
                if (this.m_hashAlg == null && this.m_element != null)
                {
                    this.ParseHashAlgorithm();
                }
                byte[] array = null;
                object internalSyncObject = this.InternalSyncObject;
                lock (internalSyncObject)
                {
                    array = hostEvidence.GenerateHash(this.m_hashAlg);
                }
                if (array != null && HashMembershipCondition.CompareArrays(array, this.m_value))
                {
                    usedEvidence = hostEvidence;
                    return(true);
                }
            }
            return(false);
        }