summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/prng/DigestRandomGenerator.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/src/crypto/prng/DigestRandomGenerator.cs b/crypto/src/crypto/prng/DigestRandomGenerator.cs
index f5a29952a..024db2852 100644
--- a/crypto/src/crypto/prng/DigestRandomGenerator.cs
+++ b/crypto/src/crypto/prng/DigestRandomGenerator.cs
@@ -1,7 +1,7 @@
 using System;
 
-using Org.BouncyCastle.Crypto.Digests;
 using Org.BouncyCastle.Crypto.Utilities;
+using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Crypto.Prng
 {
@@ -40,8 +40,11 @@ namespace Org.BouncyCastle.Crypto.Prng
 		{
 			lock (this)
 			{
-				DigestUpdate(inSeed);
-				DigestUpdate(seed);
+                if (!Arrays.IsNullOrEmpty(inSeed))
+                {
+                    DigestUpdate(inSeed);
+                }
+                DigestUpdate(seed);
 				DigestDoFinal(seed);
 			}
 		}