diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-18 13:50:34 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-18 13:50:34 +0700 |
commit | b39607fcc753bc1e8bcfdfb048e4e5d92a066632 (patch) | |
tree | 9c9ec7f4c9d6cac17075cf8cb472cfae88e210f9 | |
parent | Merge branch 'master' of git.bouncycastle.org:bc-csharp into pcl (diff) | |
parent | Move classes up into Org.BC.Crypto (diff) | |
download | BouncyCastle.NET-ed25519-b39607fcc753bc1e8bcfdfb048e4e5d92a066632.tar.xz |
Merge branch 'master' of git.bouncycastle.org:bc-csharp into pcl
-rw-r--r-- | crypto/crypto.csproj | 20 | ||||
-rw-r--r-- | crypto/src/crypto/IEntropySource.cs (renamed from crypto/src/crypto/prng/IEntropySource.cs) | 2 | ||||
-rw-r--r-- | crypto/src/crypto/IEntropySourceProvider.cs (renamed from crypto/src/crypto/prng/IEntropySourceProvider.cs) | 2 | ||||
-rw-r--r-- | crypto/src/crypto/prng/X931Rng.cs | 7 | ||||
-rw-r--r-- | crypto/src/crypto/prng/X931SecureRandom.cs | 2 |
5 files changed, 19 insertions, 14 deletions
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); } } } |