diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-11-11 16:19:25 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-11-11 16:19:25 +0700 |
commit | 442ab775f681714fad5e4cb0a85bc035f249945f (patch) | |
tree | 667f7d1a11965042b8001d6c976a9019b1002790 /crypto/src | |
parent | Don't require there to be any digests, to allow in particular for a certs-onl... (diff) | |
download | BouncyCastle.NET-ed25519-442ab775f681714fad5e4cb0a85bc035f249945f.tar.xz |
Auto-initialize random if necessary
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/crypto/generators/ECKeyPairGenerator.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/src/crypto/generators/ECKeyPairGenerator.cs b/crypto/src/crypto/generators/ECKeyPairGenerator.cs index 8f2b1c2b5..a936755e2 100644 --- a/crypto/src/crypto/generators/ECKeyPairGenerator.cs +++ b/crypto/src/crypto/generators/ECKeyPairGenerator.cs @@ -81,6 +81,11 @@ namespace Org.BouncyCastle.Crypto.Generators } this.random = parameters.Random; + + if (this.random == null) + { + this.random = new SecureRandom(); + } } /** |