diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2016-05-07 15:12:30 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2016-05-07 15:12:30 +0700 |
commit | a803651ae8ece3cb203bdaaee0cffef8f43689c7 (patch) | |
tree | 55ed969e6e277acbaf8a69637dc8824fdf2c936b | |
parent | Extra test method (diff) | |
download | BouncyCastle.NET-ed25519-a803651ae8ece3cb203bdaaee0cffef8f43689c7.tar.xz |
Update ECDomainParameters GetHashCode
-rw-r--r-- | crypto/src/crypto/parameters/ECDomainParameters.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/src/crypto/parameters/ECDomainParameters.cs b/crypto/src/crypto/parameters/ECDomainParameters.cs index 9d1544771..732fbdfa4 100644 --- a/crypto/src/crypto/parameters/ECDomainParameters.cs +++ b/crypto/src/crypto/parameters/ECDomainParameters.cs @@ -104,10 +104,14 @@ namespace Org.BouncyCastle.Crypto.Parameters public override int GetHashCode() { - return curve.GetHashCode() - ^ g.GetHashCode() - ^ n.GetHashCode() - ^ h.GetHashCode(); + int hc = curve.GetHashCode(); + hc *= 37; + hc ^= g.GetHashCode(); + hc *= 37; + hc ^= n.GetHashCode(); + hc *= 37; + hc ^= h.GetHashCode(); + return hc; } } } |