diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-11-06 11:14:59 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-11-06 11:14:59 +0700 |
commit | a25166ff4f251c0c9e6a743c0d47cc069e72ff2e (patch) | |
tree | 76dfcf5143635b3a845735e19cd24cecffbbee0e /crypto | |
parent | Refactoring (diff) | |
download | BouncyCastle.NET-ed25519-a25166ff4f251c0c9e6a743c0d47cc069e72ff2e.tar.xz |
Add null-safe GetHashCode
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/util/Platform.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/src/util/Platform.cs b/crypto/src/util/Platform.cs index 6f7a8b17b..547cef3fa 100644 --- a/crypto/src/util/Platform.cs +++ b/crypto/src/util/Platform.cs @@ -165,6 +165,11 @@ namespace Org.BouncyCastle.Utilities } #endif + internal static int GetHashCode(object obj) + { + return null == obj ? 0 : obj.GetHashCode(); + } + internal static string ToLowerInvariant(string s) { #if PORTABLE |