summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-11-06 11:14:59 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-11-06 11:14:59 +0700
commita25166ff4f251c0c9e6a743c0d47cc069e72ff2e (patch)
tree76dfcf5143635b3a845735e19cd24cecffbbee0e /crypto
parentRefactoring (diff)
downloadBouncyCastle.NET-ed25519-a25166ff4f251c0c9e6a743c0d47cc069e72ff2e.tar.xz
Add null-safe GetHashCode
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/util/Platform.cs5
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