public class JournalingSecureRandom
extends java.security.SecureRandom
Constructor and Description |
---|
JournalingSecureRandom(byte[] transcript,
java.security.SecureRandom random)
Constructor with a prior transcript.
|
JournalingSecureRandom(java.security.SecureRandom random)
Base constructor - no prior transcript.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the internals
|
byte[] |
getTranscript()
Return the transcript so far,
|
void |
nextBytes(byte[] bytes)
Fill bytes with random data, journaling the random data before returning.
|
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getInstanceStrong, getProvider, getSeed, next, setSeed, setSeed
public JournalingSecureRandom(java.security.SecureRandom random)
random
- source of randomness we will be journaling.public JournalingSecureRandom(byte[] transcript, java.security.SecureRandom random)
transcript
- initial transcript of randomness.random
- source of randomness we will be journaling when the transcript runs out.public final void nextBytes(byte[] bytes)
nextBytes
in class java.security.SecureRandom
bytes
- a block of bytes to be filled with random data.public void clear()
public byte[] getTranscript()