GV2 database.

This commit is contained in:
Alan Evans
2020-03-27 15:55:44 -03:00
committed by Greyson Parrelli
parent 640c82d517
commit 9e6cca1cd0
23 changed files with 513 additions and 78 deletions

View File

@@ -428,13 +428,13 @@ public class Util {
}
public static byte[] getSecretBytes(int size) {
byte[] secret = new byte[size];
getSecureRandom().nextBytes(secret);
return secret;
return getSecretBytes(new SecureRandom(), size);
}
public static SecureRandom getSecureRandom() {
return new SecureRandom();
public static byte[] getSecretBytes(@NonNull SecureRandom secureRandom, int size) {
byte[] secret = new byte[size];
secureRandom.nextBytes(secret);
return secret;
}
public static int getDaysTillBuildExpiry() {