diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-23 17:36:05 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-23 17:36:05 +0700 |
commit | 6523b613d4a657b02da0777083116a2f5df55e98 (patch) | |
tree | cc49fe502a5d73648cad86b3ca2dfce73a8b9d28 /crypto/src/tls | |
parent | Change BigInteger arbitrary random source (diff) | |
download | BouncyCastle.NET-ed25519-6523b613d4a657b02da0777083116a2f5df55e98.tar.xz |
Complete SecureRandom refactoring
Diffstat (limited to 'crypto/src/tls')
-rw-r--r-- | crypto/src/tls/crypto/impl/bc/BcTlsCrypto.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsCrypto.cs b/crypto/src/tls/crypto/impl/bc/BcTlsCrypto.cs index 66f47c091..8e193f187 100644 --- a/crypto/src/tls/crypto/impl/bc/BcTlsCrypto.cs +++ b/crypto/src/tls/crypto/impl/bc/BcTlsCrypto.cs @@ -28,12 +28,15 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC private readonly SecureRandom m_entropySource; public BcTlsCrypto() - : this(new SecureRandom()) + : this(CryptoServicesRegistrar.GetSecureRandom()) { } public BcTlsCrypto(SecureRandom entropySource) { + if (entropySource == null) + throw new ArgumentNullException(nameof(entropySource)); + this.m_entropySource = entropySource; } |