diff options
Diffstat (limited to 'core/src/main/java/org/spongycastle/crypto/prng/EntropySource.java')
-rw-r--r-- | core/src/main/java/org/spongycastle/crypto/prng/EntropySource.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/core/src/main/java/org/spongycastle/crypto/prng/EntropySource.java b/core/src/main/java/org/spongycastle/crypto/prng/EntropySource.java new file mode 100644 index 00000000..783f375c --- /dev/null +++ b/core/src/main/java/org/spongycastle/crypto/prng/EntropySource.java @@ -0,0 +1,25 @@ +package org.spongycastle.crypto.prng; + +public interface EntropySource +{ + /** + * Return whether or not this entropy source is regarded as prediction resistant. + * + * @return true if it is, false otherwise. + */ + boolean isPredictionResistant(); + + /** + * Return a byte array of entropy. + * + * @return entropy bytes. + */ + byte[] getEntropy(); + + /** + * Return the number of bits of entropy this source can produce. + * + * @return size in bits of the return value of getEntropy. + */ + int entropySize(); +} |