Skip to content

Commit

Permalink
added reseting of transcript to reset() method
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Mar 9, 2019
1 parent 2d37f8a commit a84e392
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ public class JournalingSecureRandom
private static byte[] EMPTY_TRANSCRIPT = new byte[0];

private final SecureRandom base;
private final byte[] transcript;

private TranscriptStream tOut = new TranscriptStream();
private byte[] transcript;

private int index = 0;

/**
Expand Down Expand Up @@ -117,9 +118,12 @@ public void clear()
*/
public void reset()
{

index = 0;

if (index == transcript.length)
{
transcript = tOut.toByteArray();
}
tOut.reset();
}

/**
Expand Down

0 comments on commit a84e392

Please sign in to comment.