Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.crypto.prng
Interface RandomGenerator

All Known Implementing Classes:
  DigestRandomGenerator, ReversedWindowGenerator, VMPCRandomGenerator

public interface RandomGenerator

Generic interface for objects generating random bytes.

Method Summary
`void` | `addSeedMaterial(byte[] seed)` Add more seed material to the generator.
`void` | `addSeedMaterial(long seed)` Add more seed material to the generator.
`void` | `nextBytes(byte[] bytes)` Fill bytes with random values.
`void` | `nextBytes(byte[] bytes, int start, int len)` Fill part of bytes with random values.

Method Detail

### addSeedMaterial

    public void addSeedMaterial(byte[] seed)

  Add more seed material to the generator.

  Parameters:
    `seed` - a byte array to be mixed into the generator's state.

### addSeedMaterial

    public void addSeedMaterial(long seed)

  Add more seed material to the generator.

  Parameters:
    `seed` - a long value to be mixed into the generator's state.

### nextBytes

    public void nextBytes(byte[] bytes)

  Fill bytes with random values.

  Parameters:
    `bytes` - byte array to be filled.

### nextBytes

    public void nextBytes(byte[] bytes,
                          int start,
                          int len)

  Fill part of bytes with random values.

  Parameters:
    `bytes` - byte array to be filled.
    `start` - index to start filling at.
    `len` - length of segment to fill.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD