Fortuna: Add getByte() method

This commit is contained in:
zzz
2016-01-13 16:11:39 +00:00
parent e2b7f504b0
commit ca00ea7a76
3 changed files with 17 additions and 2 deletions

View File

@@ -183,6 +183,17 @@ public class FortunaRandomSource extends RandomSource implements EntropyHarveste
}
}
/**
* Not part of java.util.SecureRandom, but added for efficiency, since Fortuna supports it.
*
* @since 0.9.24
*/
public byte nextByte() {
synchronized(_fortuna) {
return _fortuna.nextByte();
}
}
/**
* Implementation from sun's java.util.Random javadocs
*/