From d8e4d782d4ba599ec1cfa93791ae10efe88840c5 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 12 Oct 2022 00:24:12 +0700 Subject: Add barebones CryptoServicesRegistrar class --- crypto/src/crypto/CryptoServicesRegistrar.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crypto/src/crypto/CryptoServicesRegistrar.cs 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(); + } + } +} -- cgit 1.4.1