diff --git a/crypto/crypto.csproj b/crypto/crypto.csproj
index ecfdc7311..1685c54d9 100644
--- a/crypto/crypto.csproj
+++ b/crypto/crypto.csproj
@@ -3079,6 +3079,16 @@
BuildAction = "Compile"
/>
<File
+ RelPath = "src\crypto\IEntropySource.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "src\crypto\IEntropySourceProvider.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "src\crypto\IMac.cs"
SubType = "Code"
BuildAction = "Compile"
@@ -4344,16 +4354,6 @@
BuildAction = "Compile"
/>
<File
- RelPath = "src\crypto\prng\IEntropySource.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "src\crypto\prng\IEntropySourceProvider.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
RelPath = "src\crypto\prng\IRandomGenerator.cs"
SubType = "Code"
BuildAction = "Compile"
diff --git a/crypto/src/crypto/prng/IEntropySource.cs b/crypto/src/crypto/IEntropySource.cs
index 90b9e61af..62e3bc76c 100644
--- a/crypto/src/crypto/prng/IEntropySource.cs
+++ b/crypto/src/crypto/IEntropySource.cs
@@ -1,6 +1,6 @@
using System;
-namespace Org.BouncyCastle.Crypto.Prng
+namespace Org.BouncyCastle.Crypto
{
/// <summary>
/// Base interface describing an entropy source for a DRBG.
diff --git a/crypto/src/crypto/prng/IEntropySourceProvider.cs b/crypto/src/crypto/IEntropySourceProvider.cs
index 643f92ef8..756414171 100644
--- a/crypto/src/crypto/prng/IEntropySourceProvider.cs
+++ b/crypto/src/crypto/IEntropySourceProvider.cs
@@ -1,6 +1,6 @@
using System;
-namespace Org.BouncyCastle.Crypto.Prng
+namespace Org.BouncyCastle.Crypto
{
/// <summary>
/// Base interface describing a provider of entropy sources.
diff --git a/crypto/src/crypto/prng/X931Rng.cs b/crypto/src/crypto/prng/X931Rng.cs
index 987379d4b..2bd8e0c6b 100644
--- a/crypto/src/crypto/prng/X931Rng.cs
+++ b/crypto/src/crypto/prng/X931Rng.cs
@@ -10,7 +10,7 @@ namespace Org.BouncyCastle.Crypto.Prng
private const int BLOCK128_MAX_BITS_REQUEST = 1 << (19 - 1);
private readonly IBlockCipher mEngine;
- internal readonly IEntropySource mEntropySource;
+ private readonly IEntropySource mEntropySource;
private readonly byte[] mDT;
private readonly byte[] mI;
@@ -114,6 +114,11 @@ namespace Org.BouncyCastle.Crypto.Prng
mReseedCounter = 1;
}
+ internal IEntropySource EntropySource
+ {
+ get { return mEntropySource; }
+ }
+
private void Process(byte[] res, byte[] a, byte[] b)
{
for (int i = 0; i != res.Length; i++)
diff --git a/crypto/src/crypto/prng/X931SecureRandom.cs b/crypto/src/crypto/prng/X931SecureRandom.cs
index bce8d2cf1..d2e4849c5 100644
--- a/crypto/src/crypto/prng/X931SecureRandom.cs
+++ b/crypto/src/crypto/prng/X931SecureRandom.cs
@@ -64,7 +64,7 @@ namespace Org.BouncyCastle.Crypto.Prng
public override byte[] GenerateSeed(int numBytes)
{
- return EntropyUtilities.GenerateSeed(mDrbg.mEntropySource, numBytes);
+ return EntropyUtilities.GenerateSeed(mDrbg.EntropySource, numBytes);
}
}
}
|