Documentation of 'org.uncommons.maths.random.RandomDotOrgSeedGenerator' Java class
RandomDotOrgSeedGenerator
org.uncommons.maths.random

Class RandomDotOrgSeedGenerator

  • All Implemented Interfaces:
    SeedGenerator


    public class RandomDotOrgSeedGenerator
    extends java.lang.Object
    implements SeedGenerator
    Connects to the random.org website (via HTTPS) and downloads a set of random bits to use as seed data. It is generally better to use the DevRandomSeedGenerator where possible, as it should be much quicker. This seed generator is most useful on Microsoft Windows and other platforms that do not provide /dev/random.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] generateSeed(int length)
      Generate a seed value for a random number generator.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RandomDotOrgSeedGenerator

        public RandomDotOrgSeedGenerator()
    • Method Detail

      • generateSeed

        public byte[] generateSeed(int length)
                            throws SeedException
        Generate a seed value for a random number generator.
        Specified by:
        generateSeed in interface SeedGenerator
        Parameters:
        length - The length of the seed to generate (in bytes).
        Returns:
        A byte array containing the seed data.
        Throws:
        SeedException - If a seed cannot be generated for any reason.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.