diff options
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/pwgen/randnum.java')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/pwgen/randnum.java | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgen/randnum.java b/app/src/main/java/com/zeapo/pwdstore/pwgen/randnum.java deleted file mode 100644 index 583d0863..00000000 --- a/app/src/main/java/com/zeapo/pwdstore/pwgen/randnum.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.zeapo.pwdstore.pwgen; - -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; - -class randnum { - private static SecureRandom random; - - static { - try { - random = SecureRandom.getInstance("SHA1PRNG"); - } catch (NoSuchAlgorithmException e) { - throw new SecurityException("SHA1PRNG not available", e); - } - } - - /** - * Generate a random number n, where 0 <= n < maxNum. - * - * @param maxNum the bound on the random number to be returned - * @return the generated random number - */ - public static int number(int maxNum) { - return random.nextInt(maxNum); - } -} |
