in UProveCrypto/Math/bc/SubgroupGroupBCImpl.cs [335:379]
public override bool Equals(object o)
{
if (Object.ReferenceEquals(o, this))
{
return true;
}
SubgroupGroupBCImpl sggi = o as SubgroupGroupBCImpl;
if (sggi == null)
{
return false;
}
if (!this.P.SequenceEqual(sggi.P)) return false;
if (!this.Q.SequenceEqual(sggi.Q)) return false;
if (!this.G.Equals(sggi.G)) return false;
// check for null
if (this.DomainParameterSeed != null)
{
if (sggi.DomainParameterSeed == null) return false;
// okay do a full comparison
if (!this.DomainParameterSeed.SequenceEqual(sggi.DomainParameterSeed))
return false;
}
else
{
if (sggi.DomainParameterSeed != null) return false;
}
// check for null
if (this.GroupName != null)
{
if (sggi.GroupName == null) return false;
// okay do a full comparison
if (!this.GroupName.Equals(sggi.GroupName)) return false;
}
else
{
if (sggi.GroupName != null) return false;
}
return true;
}