gnu.crypto.prng.*: type arguments

This commit is contained in:
str4d
2013-11-21 02:18:59 +00:00
parent e38db5eb44
commit 688dd23111
4 changed files with 9 additions and 9 deletions

View File

@@ -42,8 +42,8 @@ public class AsyncFortunaStandalone extends FortunaStandalone implements Runnabl
super();
_bufferCount = Math.max(context.getProperty("prng.buffers", DEFAULT_BUFFERS), 2);
_bufferSize = Math.max(context.getProperty("prng.bufferSize", DEFAULT_BUFSIZE), 16*1024);
_emptyBuffers = new LinkedBlockingQueue(_bufferCount);
_fullBuffers = new LinkedBlockingQueue(_bufferCount);
_emptyBuffers = new LinkedBlockingQueue<AsyncBuffer>(_bufferCount);
_fullBuffers = new LinkedBlockingQueue<AsyncBuffer>(_bufferCount);
_context = context;
context.statManager().createRequiredRateStat("prng.bufferWaitTime", "Delay for random number buffer (ms)", "Encryption", new long[] { 60*1000, 10*60*1000, 60*60*1000 } );
context.statManager().createRequiredRateStat("prng.bufferFillTime", "Time to fill random number buffer (ms)", "Encryption", new long[] { 60*1000, 10*60*1000, 60*60*1000 } );
@@ -77,7 +77,7 @@ public class AsyncFortunaStandalone extends FortunaStandalone implements Runnabl
/** the seed is only propogated once the prng is started with startup() */
@Override
public void seed(byte val[]) {
Map props = Collections.singletonMap(SEED, val);
Map<String, byte[]> props = Collections.singletonMap(SEED, val);
init(props);
//fillBlock();
}

View File

@@ -91,7 +91,7 @@ public abstract class BasePRNGStandalone implements IRandomStandalone {
return name;
}
public void init(Map attributes) {
public void init(Map<String, byte[]> attributes) {
this.setup(attributes);
ndx = 0;
@@ -179,7 +179,7 @@ public abstract class BasePRNGStandalone implements IRandomStandalone {
return super.clone();
}
public abstract void setup(Map attributes);
public abstract void setup(Map<String, byte[]> attributes);
public abstract void fillBlock(); //throws LimitReachedException;
}

View File

@@ -131,12 +131,12 @@ public class FortunaStandalone extends BasePRNGStandalone implements Serializabl
}
public void seed(byte val[]) {
Map props = Collections.singletonMap(SEED, val);
Map<String, byte[]> props = Collections.singletonMap(SEED, val);
init(props);
fillBlock();
}
public void setup(Map attributes)
public void setup(Map<String, byte[]> attributes)
{
lastReseed = 0;
reseedCount = 0;
@@ -312,7 +312,7 @@ public class FortunaStandalone extends BasePRNGStandalone implements Serializabl
incrementCounter();
}
public void setup(Map attributes)
public void setup(Map<String, byte[]> attributes)
{
seeded = false;
Arrays.fill(key, (byte) 0);

View File

@@ -107,7 +107,7 @@ public interface IRandomStandalone extends Cloneable {
* @exception IllegalArgumentException if at least one of the defined name/
* value pairs contains invalid data.
*/
void init(Map attributes);
void init(Map<String, byte[]> attributes);
/**
* <p>Returns the next 8 bits of random data generated from this instance.</p>