All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prng.collector.HeapEntropy Maven / Gradle / Ivy

There is a newer version: 0.7
Show newest version
package prng.collector;

import prng.config.Config;

/**
 * Collect entropy from how objects are allocated on the heap.
 *
 * @author Simon Greatrix
 */
public class HeapEntropy extends EntropyCollector {

  /**
   * Create a collector that uses heap allocation to produce entropy
   *
   * @param config configuration for this
   */
  public HeapEntropy(Config config) {
    super(config, 100);
  }


  @Override
  protected boolean initialise() {
    return true;
  }


  @Override
  protected void runImpl() {
    setEvent(System.identityHashCode(new Object()));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy