Esempio n. 1
0
        /// <summary>
        /// Determines whether the specified objects are equal.
        /// </summary>
        /// <param name="x">The first object to compare.</param>
        /// <param name="y">The second object to compare.</param>
        /// <returns>
        /// true if the specified objects are equal; otherwise, false.
        /// </returns>
        public bool Equals(string x, string y)
        {
            string xHash = QQnCryptoHelpers.NormalizeHashValue(x, false, false);
            string yHash = QQnCryptoHelpers.NormalizeHashValue(y, false, false);

            return(StringComparer.OrdinalIgnoreCase.Equals(xHash, yHash));
        }
Esempio n. 2
0
        /// <summary>
        /// Returns a hash code for the specified object.
        /// </summary>
        /// <param name="obj">The <see cref="T:System.Object"/> for which a hash code is to be returned.</param>
        /// <returns>A hash code for the specified object.</returns>
        /// <exception cref="T:System.ArgumentNullException">The type of <paramref name="obj"/> is a reference type and <paramref name="obj"/> is null.</exception>
        public int GetHashCode(string obj)
        {
            string xHash = QQnCryptoHelpers.NormalizeHashValue(obj, false, false);

            return(StringComparer.OrdinalIgnoreCase.GetHashCode(xHash));
        }