summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/utils/SecureRandomTest.java
Commit message (Collapse)AuthorAgeFilesLines
* Introduce SecureRandom wrapper for properly seeded static instancesFlorian Zschocke2016-12-121-0/+33
Introduce our own wrapper `SecureRandom` around `java.security.SecureRandom`. This a) makes sure that the PRNG is seeded on creation and not when random bytes are retrieved, and b) uses a static instance in the `UserModel` so that lags do not occur during operation due to potentially seeding getting blocked on Unix when reading from the system's entropy pool. To keep the random data still secure, the static instance will reseed all 24 hours, also a functionality of the wrapper class. This fixes #1063 and extends and closes PR #1116