diff options
author | Roberto Tyley <roberto.tyley@gmail.com> | 2014-07-15 01:38:01 +0400 |
---|---|---|
committer | Roberto Tyley <roberto.tyley@gmail.com> | 2014-07-26 11:23:17 +0400 |
commit | 7cb752aaf746dc0b473afeb9e892b7fbc12666c5 (patch) | |
tree | cc4f91ddc18332b5adbe82e3fcb040d976c90105 /core/src/test/java/org/bouncycastle/crypto/prng/test/TestEntropySourceProvider.java | |
parent | 551830f8ea5177042af2c7dd1fc90888bc67387d (diff) |
Execute become-spongy.sh
https://github.com/rtyley/spongycastle/blob/3040af/become-spongy.sh
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.java | 46 |
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; - } - }; - } -} |