Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/bouncycastle/crypto/prng/test/TestEntropySourceProvider.java')
-rw-r--r--core/src/test/java/org/bouncycastle/crypto/prng/test/TestEntropySourceProvider.java46
1 files changed, 0 insertions, 46 deletions
diff --git a/core/src/test/java/org/bouncycastle/crypto/prng/test/TestEntropySourceProvider.java b/core/src/test/java/org/bouncycastle/crypto/prng/test/TestEntropySourceProvider.java
deleted file mode 100644
index 64e75958..00000000
--- a/core/src/test/java/org/bouncycastle/crypto/prng/test/TestEntropySourceProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.bouncycastle.crypto.prng.test;
-
-import org.bouncycastle.crypto.prng.EntropySource;
-import org.bouncycastle.crypto.prng.EntropySourceProvider;
-
-public class TestEntropySourceProvider
- implements EntropySourceProvider
-{
- private final byte[] data;
- private final boolean isPredictionResistant;
-
- protected TestEntropySourceProvider(byte[] data, boolean isPredictionResistant)
- {
- this.data = data;
- this.isPredictionResistant = isPredictionResistant;
- }
-
- public EntropySource get(final int bitsRequired)
- {
- return new EntropySource()
- {
- int index = 0;
-
- public boolean isPredictionResistant()
- {
- return isPredictionResistant;
- }
-
- public byte[] getEntropy()
- {
- byte[] rv = new byte[bitsRequired / 8];
-
- System.arraycopy(data, index, rv, 0, rv.length);
-
- index += bitsRequired / 8;
-
- return rv;
- }
-
- public int entropySize()
- {
- return bitsRequired;
- }
- };
- }
-}