EntropySourceProvider
public class BasicEntropySourceProvider extends java.lang.Object implements EntropySourceProvider
Constructor | Description |
---|---|
BasicEntropySourceProvider(java.security.SecureRandom random,
boolean isPredictionResistant) |
Create a entropy source provider based on the passed in SecureRandom.
|
Modifier and Type | Method | Description |
---|---|---|
EntropySource |
get(int bitsRequired) |
Return an entropy source that will create bitsRequired bits of entropy on
each invocation of getEntropy().
|
public BasicEntropySourceProvider(java.security.SecureRandom random, boolean isPredictionResistant)
random
- the SecureRandom to base EntropySource construction on.isPredictionResistant
- boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).public EntropySource get(int bitsRequired)
get
in interface EntropySourceProvider
bitsRequired
- size (in bits) of entropy to be created by the provided source.