| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final SecureRandom | |
| private static byte[] | |
| private int | |
| private JournalingSecureRandom. | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JournalingSecureRandom(SecureRandom
source of randomness we will be journaling. random)Base constructor - no prior transcript. |
| public | JournalingSecureRandom(byte[]
initial transcript of randomness. transcript, SecureRandom source of randomness we will be journaling when the transcript runs out. random)Constructor with a prior transcript. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public byte[] | Returns: a copy of the original transcript on construction, plus any randomness added since.Return the full transcript, such as would be needed to create a copy of this JournalingSecureRandom, |
| public byte[] | |
| public final void | nextBytes(byte[]
a block of bytes to be filled with random data. bytes)Overrides java. Overrides default java. Fill bytes with random data, journaling the random data before returning or re-use previously used random data, depending on the state of the transcript. |
| public void |
| base | back to summary |
|---|---|
| private final SecureRandom base | |
| EMPTY_TRANSCRIPT | back to summary |
|---|---|
| private static byte[] EMPTY_TRANSCRIPT | |
| index | back to summary |
|---|---|
| private int index | |
| tOut | back to summary |
|---|---|
| private JournalingSecureRandom. | |
| transcript | back to summary |
|---|---|
| private byte[] transcript | |
| JournalingSecureRandom | back to summary |
|---|---|
| public JournalingSecureRandom() Default constructor that takes an arbitrary SecureRandom as initial random | |
| JournalingSecureRandom | back to summary |
|---|---|
| public JournalingSecureRandom(SecureRandom random) Base constructor - no prior transcript.
| |
| JournalingSecureRandom | back to summary |
|---|---|
| public JournalingSecureRandom(byte[] transcript, SecureRandom random) Constructor with a prior transcript. Both the transcript used and any new randomness are journaled.
| |
| clear | back to summary |
|---|---|
| public void clear() Clear the internals | |
| getFullTranscript | back to summary |
|---|---|
| public byte[] getFullTranscript() Return the full transcript, such as would be needed to create a copy of this JournalingSecureRandom,
| |
| getTranscript | back to summary |
|---|---|
| public byte[] getTranscript() Return the transcript so far,
| |
| nextBytes | back to summary |
|---|---|
| public final void nextBytes(byte[] bytes) Overrides java. Overrides default java. Fill bytes with random data, journaling the random data before returning or re-use previously used random data, depending on the state of the transcript.
| |
| reset | back to summary |
|---|---|
| public void reset() Resets the index to zero such that the randomness will now be reused | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| TranscriptStream | back to summary |
|---|---|
| private TranscriptStream() | |
| clear | back to summary |
|---|---|
| public void clear() | |