We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 548bfc5 commit c80f3e7Copy full SHA for c80f3e7
src/main/java/io/github/hapjava/server/impl/crypto/HAPSetupCodeUtils.java
@@ -17,13 +17,7 @@ public static String randomAlphaNumeric(int count) {
17
}
18
19
public static String generateSetupId() {
20
- String setupId =
21
- ""
22
- + ALPHA_NUMERIC_STRING.charAt((int) (Math.random() * ALPHA_NUMERIC_STRING.length()))
23
24
25
- + ALPHA_NUMERIC_STRING.charAt((int) (Math.random() * ALPHA_NUMERIC_STRING.length()));
26
- return setupId;
+ return randomAlphaNumeric(4);
27
28
29
private static byte[] calculateHash(final String input, final Digest digest) {
0 commit comments