diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-09-16 09:42:27 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-09-16 09:42:27 +0700 |
commit | c2aa15d6ed73998d59901082f4f754934ee8aa5e (patch) | |
tree | 652873111451cb61eb25f823653106cb6d67ef1c | |
parent | Merge branch 'master' of git.bouncycastle.org:bc-csharp (diff) | |
download | BouncyCastle.NET-ed25519-c2aa15d6ed73998d59901082f4f754934ee8aa5e.tar.xz |
Use RandomNumberGenerator.Create
-rw-r--r-- | crypto/src/crypto/prng/CryptoApiEntropySourceProvider.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/prng/CryptoApiRandomGenerator.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/crypto/prng/CryptoApiEntropySourceProvider.cs b/crypto/src/crypto/prng/CryptoApiEntropySourceProvider.cs index 68579aaf4..459d3a740 100644 --- a/crypto/src/crypto/prng/CryptoApiEntropySourceProvider.cs +++ b/crypto/src/crypto/prng/CryptoApiEntropySourceProvider.cs @@ -11,7 +11,7 @@ namespace Org.BouncyCastle.Crypto.Prng private readonly bool mPredictionResistant; public CryptoApiEntropySourceProvider() - : this(new RNGCryptoServiceProvider(), true) + : this(RandomNumberGenerator.Create(), true) { } diff --git a/crypto/src/crypto/prng/CryptoApiRandomGenerator.cs b/crypto/src/crypto/prng/CryptoApiRandomGenerator.cs index fa5f523d3..0b6592025 100644 --- a/crypto/src/crypto/prng/CryptoApiRandomGenerator.cs +++ b/crypto/src/crypto/prng/CryptoApiRandomGenerator.cs @@ -6,7 +6,7 @@ using System.Security.Cryptography; namespace Org.BouncyCastle.Crypto.Prng { /// <summary> - /// Uses Microsoft's RNGCryptoServiceProvider + /// Uses RandomNumberGenerator.Create() to get randomness generator /// </summary> public class CryptoApiRandomGenerator : IRandomGenerator @@ -14,7 +14,7 @@ namespace Org.BouncyCastle.Crypto.Prng private readonly RandomNumberGenerator rndProv; public CryptoApiRandomGenerator() - : this(new RNGCryptoServiceProvider()) + : this(RandomNumberGenerator.Create()) { } |