From 855811a35c33701da79ded77ddcad35976ce12d7 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 18 Nov 2015 13:48:53 +0700 Subject: Move classes up into Org.BC.Crypto --- crypto/crypto.csproj | 20 ++++++++-------- crypto/src/crypto/IEntropySource.cs | 29 ++++++++++++++++++++++++ crypto/src/crypto/IEntropySourceProvider.cs | 17 ++++++++++++++ crypto/src/crypto/prng/IEntropySource.cs | 29 ------------------------ crypto/src/crypto/prng/IEntropySourceProvider.cs | 17 -------------- 5 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 crypto/src/crypto/IEntropySource.cs create mode 100644 crypto/src/crypto/IEntropySourceProvider.cs delete mode 100644 crypto/src/crypto/prng/IEntropySource.cs delete mode 100644 crypto/src/crypto/prng/IEntropySourceProvider.cs (limited to 'crypto') diff --git a/crypto/crypto.csproj b/crypto/crypto.csproj index ecfdc7311..1685c54d9 100644 --- a/crypto/crypto.csproj +++ b/crypto/crypto.csproj @@ -3078,6 +3078,16 @@ SubType = "Code" BuildAction = "Compile" /> + + - - + /// Base interface describing an entropy source for a DRBG. + /// + public interface IEntropySource + { + /// + /// Return whether or not this entropy source is regarded as prediction resistant. + /// + /// true if this instance is prediction resistant; otherwise, false. + bool IsPredictionResistant { get; } + + /// + /// Return a byte array of entropy. + /// + /// The entropy bytes. + byte[] GetEntropy(); + + /// + /// Return the number of bits of entropy this source can produce. + /// + /// The size, in bits, of the return value of getEntropy. + int EntropySize { get; } + } +} + diff --git a/crypto/src/crypto/IEntropySourceProvider.cs b/crypto/src/crypto/IEntropySourceProvider.cs new file mode 100644 index 000000000..756414171 --- /dev/null +++ b/crypto/src/crypto/IEntropySourceProvider.cs @@ -0,0 +1,17 @@ +using System; + +namespace Org.BouncyCastle.Crypto +{ + /// + /// Base interface describing a provider of entropy sources. + /// + public interface IEntropySourceProvider + { + /// + /// Return an entropy source providing a block of entropy. + /// + /// The size of the block of entropy required. + /// An entropy source providing bitsRequired blocks of entropy. + IEntropySource Get(int bitsRequired); + } +} diff --git a/crypto/src/crypto/prng/IEntropySource.cs b/crypto/src/crypto/prng/IEntropySource.cs deleted file mode 100644 index 90b9e61af..000000000 --- a/crypto/src/crypto/prng/IEntropySource.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; - -namespace Org.BouncyCastle.Crypto.Prng -{ - /// - /// Base interface describing an entropy source for a DRBG. - /// - public interface IEntropySource - { - /// - /// Return whether or not this entropy source is regarded as prediction resistant. - /// - /// true if this instance is prediction resistant; otherwise, false. - bool IsPredictionResistant { get; } - - /// - /// Return a byte array of entropy. - /// - /// The entropy bytes. - byte[] GetEntropy(); - - /// - /// Return the number of bits of entropy this source can produce. - /// - /// The size, in bits, of the return value of getEntropy. - int EntropySize { get; } - } -} - diff --git a/crypto/src/crypto/prng/IEntropySourceProvider.cs b/crypto/src/crypto/prng/IEntropySourceProvider.cs deleted file mode 100644 index 643f92ef8..000000000 --- a/crypto/src/crypto/prng/IEntropySourceProvider.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Org.BouncyCastle.Crypto.Prng -{ - /// - /// Base interface describing a provider of entropy sources. - /// - public interface IEntropySourceProvider - { - /// - /// Return an entropy source providing a block of entropy. - /// - /// The size of the block of entropy required. - /// An entropy source providing bitsRequired blocks of entropy. - IEntropySource Get(int bitsRequired); - } -} -- cgit 1.5.1