/// <summary> Compares the hash </summary> public override int CompareTo(PasswordHash other) { if (((object)other) == null) { return(1); } return(BinaryComparer.Compare(_hash.ToArray(), other._hash.ToArray())); }
/// <summary> Returns true if the two Salts are using the same data </summary> public override bool Equals(Salt other) { return(((object)other) != null && this.Length == other.Length && BinaryComparer.Equals(_salt, other._salt)); }
/// <summary> Returns a hash code the instance of the object </summary> int IEqualityComparer <byte[]> .GetHashCode(byte[] bytes) { return(BinaryComparer.GetHashCode(bytes)); }
/// <summary> Returns true if the two objects are the same instance </summary> bool IEqualityComparer <byte[]> .Equals(byte[] x, byte[] y) { return(0 == BinaryComparer.Compare(x, y)); }
/// <summary> Compares the contents of the byte arrays and returns the result. </summary> int IComparer <byte[]> .Compare(byte[] x, byte[] y) { return(BinaryComparer.Compare(x, y)); }
/// <summary> Compares the hash codes and returns the result </summary> public override int CompareTo(Hash other) { return(other == null ? 1 : BinaryComparer.Compare(_hashCode, other._hashCode)); }