Package org.astrogrid.samp.hub
Class KeyGenerator
- java.lang.Object
-
- org.astrogrid.samp.hub.KeyGenerator
-
public class KeyGenerator extends java.lang.Object
Object which can generate a sequence of private keys. The values returned by the next() method should in general not be easy to guess.- Since:
- 26 Oct 2010
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description KeyGenerator(java.lang.String prefix, int nchar, java.util.Random random)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Random
createRandom()
Returns a new, randomly seeded, Random object.java.lang.String
next()
Returns the next key in the sequence.
-
-
-
Field Detail
-
prefix_
private final java.lang.String prefix_
-
nchar_
private final int nchar_
-
random_
private final java.util.Random random_
-
iseq_
private int iseq_
-
SEQ_DELIM
private static final char SEQ_DELIM
- See Also:
- Constant Field Values
-
-