|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.crypto.SharedSeedRNG
provides random number generators all with the same seed
| Field Summary | |
protected static java.lang.String |
ALGORITHM
algorithm used by the pseudo random number generator |
protected static java.lang.String |
HOME_DIR
home directory of the user |
protected static byte[] |
SEED
common seed used by all shuttles |
protected static java.io.File |
SEED_DIR
our settings dir to save the seed in |
protected static java.io.File |
SEED_FILE
file to save the seed in |
| Constructor Summary | |
SharedSeedRNG()
|
|
| Method Summary | |
static java.security.SecureRandom |
getRandom()
returns a random number generator seeded with the common seed |
protected static byte[] |
loadSeed()
load the seed from the seed file |
static void |
saveSeed(byte[] seed)
saves a seed into the seed file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String HOME_DIR
protected static final java.io.File SEED_DIR
protected static final java.io.File SEED_FILE
protected static final java.lang.String ALGORITHM
protected static final byte[] SEED
| Constructor Detail |
public SharedSeedRNG()
| Method Detail |
public static java.security.SecureRandom getRandom()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic static void saveSeed(byte[] seed)
seed - seed as a bytearrayprotected static byte[] loadSeed()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||