# Class DevRandomSeedGenerator

java.lang.Object
org.uncommons.maths.random.DevRandomSeedGenerator

All Implemented Interfaces:
  `SeedGenerator`

public class DevRandomSeedGenerator extends Object implements SeedGenerator
RNG seed strategy that gets data from /dev/random on systems that provide it (e.g. Solaris/Linux). If /dev/random does not exist or is not accessible, a `SeedException` is thrown.

## Constructor Summary

Constructors
Constructor
Description
`DevRandomSeedGenerator()`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`generateSeed(int length)`
Generate a seed value for a random number generator.
`String`
`toString()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### DevRandomSeedGenerator

public DevRandomSeedGenerator()

## Method Details

### 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:
  The requested number of random bytes, read directly from /dev/random.
Throws:
  `SeedException` - If /dev/random does not exist or is not accessible

### toString

public String toString()

Overrides:
  `toString` in class `Object`