- All Known Implementing Classes:
FortunaRandomSource, RandomSource
public interface EntropyHarvester
Allow various components with some entropy to feed that entropy back into some PRNG. The quality of the entropy provided varies, so anything harvesting should discriminate based on the offered "source" of the entropy, silently discarding insufficient entropy sources.
Method Summary
All MethodsModifier and TypeMethodDescriptionvoidfeedEntropy(String source, byte[] data, int offset, int len) Feed the entropy pools with data[offset:offset+len].voidfeedEntropy(String source, long data, int bitoffset, int bits) Feed the entropy pools with the bits in the data.
Method Details
feedEntropy
Feed the entropy pools with data[offset:offset+len].- Parameters:
source- origin of the entropy, allowing the harvester to determine how much to value the datadata- array holding the entropy bytes to harvestoffset- index into the data array to startlen- how many bytes to use
feedEntropy
Feed the entropy pools with the bits in the data.- Parameters:
source- origin of the entropy, allowing the harvester to determine how much to value the datadata- value whose bits are to be harvestedbitoffset- bit index into the data array to start (using java standard big-endian)bits- how many bits to use