summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-12 00:24:12 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-12 00:24:12 +0700
commitd8e4d782d4ba599ec1cfa93791ae10efe88840c5 (patch)
treedae43e372bab0d3aff91c02de69b3dee35736ad2
parentAdd BcTlsCrypto default constructor (diff)
downloadBouncyCastle.NET-ed25519-d8e4d782d4ba599ec1cfa93791ae10efe88840c5.tar.xz
Add barebones CryptoServicesRegistrar class
-rw-r--r--crypto/src/crypto/CryptoServicesRegistrar.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/src/crypto/CryptoServicesRegistrar.cs b/crypto/src/crypto/CryptoServicesRegistrar.cs
new file mode 100644
index 000000000..33bf47386
--- /dev/null
+++ b/crypto/src/crypto/CryptoServicesRegistrar.cs
@@ -0,0 +1,17 @@
+using Org.BouncyCastle.Security;
+
+namespace Org.BouncyCastle.Crypto
+{
+    public static class CryptoServicesRegistrar
+    {
+        public static SecureRandom GetSecureRandom()
+        {
+            return new SecureRandom();
+        }
+
+        public static SecureRandom GetSecureRandom(SecureRandom secureRandom)
+        {
+            return secureRandom ?? new SecureRandom();
+        }
+    }
+}