/// <summary>Serves as the default hash function.</summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Id != null ? Id.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Role != null ? Role.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PasswordSHA512 != null ? PasswordSHA512.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #2
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = PasswordSHA512.GetHashCode();
         hashCode = (hashCode * 397) ^ PublicKey.GetHashCode();
         hashCode = (hashCode * 397) ^ CreationSecret.GetHashCode();
         return(hashCode);
     }
 }
 /// <summary>Serves as the default hash function.</summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (UserId != null ? UserId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PasswordSHA512 != null ? PasswordSHA512.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Totp != null ? Totp.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #4
0
        /// <summary>Serves as the default hash function.</summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = Name != null?Name.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (PasswordSHA512 != null ? PasswordSHA512.GetHashCode() : 0);
                return(hashCode);
            }
        }