mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-14 08:41:28 +00:00
- using java.util.Random in unit tests again, as performance doesn't change by using non-random PRNG - of course still using a cryptographically secure PRNG in production ;-)
This commit is contained in:
@@ -37,7 +37,7 @@ import org.junit.Test;
|
||||
|
||||
public class Aes256CryptorTest {
|
||||
|
||||
private static final Random TEST_PRNG = new NotReallyRandom();
|
||||
private static final Random TEST_PRNG = new Random();
|
||||
|
||||
private Path tmpDir;
|
||||
private Path masterKey;
|
||||
@@ -185,13 +185,4 @@ public class Aes256CryptorTest {
|
||||
|
||||
}
|
||||
|
||||
private static class NotReallyRandom extends Random {
|
||||
private static final long serialVersionUID = 6080187127141721369L;
|
||||
|
||||
@Override
|
||||
protected int next(int bits) {
|
||||
return 4; // http://xkcd.com/221/
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user