Top Description Inners Fields Constructors Methods
org.apache.sshd.common.random

public Class JceRandom

extends AbstractRandom
Class Inheritance
Imports
java.security.SecureRandom

A Random implementation using the built-in SecureRandom PRNG.
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public static final String
private final SecureRandom
private byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
fill(byte[]
byte array to be filled.
foo
,
int
index to start filling at.
start
,
int
length of segment to fill.
len
)

Implements org.apache.sshd.common.random.Random.fill.

Fill part of bytes with random values.

public static SecureRandom
public String
private static SecureRandom
public synchronized int
random(int
The range upper limit
n
)

Implements org.apache.sshd.common.random.Random.random.

Returns a pseudo-random uniformly distributed int in the half-open range [0, n).

Inherited from org.apache.sshd.common.random.AbstractRandom:
toString

Field Detail

NAMEback to summary
public static final String NAME
randomback to summary
private final SecureRandom random
tmpback to summary
private byte[] tmp

Constructor Detail

JceRandomback to summary
public JceRandom()

Method Detail

fillback to summary
public synchronized void fill(byte[] foo, int start, int len)

Implements org.apache.sshd.common.random.Random.fill.

Doc from org.apache.sshd.common.random.Random.fill.

Fill part of bytes with random values.

Parameters
foo:byte[]

byte array to be filled.

start:int

index to start filling at.

len:int

length of segment to fill.

Annotations
@Override
getGlobalInstanceback to summary
public static SecureRandom getGlobalInstance()
getNameback to summary
public String getName()

Implements org.apache.sshd.common.NamedResource.getName.

Returns:String

Doc from org.apache.sshd.common.NamedResource.getName.

The resource name

Annotations
@Override
getRandomback to summary
private static SecureRandom getRandom()
randomback to summary
public synchronized int random(int n)

Implements org.apache.sshd.common.random.Random.random.

Doc from org.apache.sshd.common.random.Random.random.

Returns a pseudo-random uniformly distributed int in the half-open range [0, n).

Parameters
n:int

The range upper limit

Returns:int

The randomly selected value in the range

Annotations
@Override
org.apache.sshd.common.random back to summary

private final Class JceRandom.Cache

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv static final SecureRandom

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final SecureRandom INSTANCE

Constructor Detail

Cacheback to summary
private Cache()