Skip to content

Commit c80f3e7

Browse files
author
Eugen Freiter
committed
incorporate review feedback
Signed-off-by: Eugen Freiter <[email protected]>
1 parent 548bfc5 commit c80f3e7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/java/io/github/hapjava/server/impl/crypto/HAPSetupCodeUtils.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ public static String randomAlphaNumeric(int count) {
1717
}
1818

1919
public static String generateSetupId() {
20-
String setupId =
21-
""
22-
+ ALPHA_NUMERIC_STRING.charAt((int) (Math.random() * ALPHA_NUMERIC_STRING.length()))
23-
+ ALPHA_NUMERIC_STRING.charAt((int) (Math.random() * ALPHA_NUMERIC_STRING.length()))
24-
+ ALPHA_NUMERIC_STRING.charAt((int) (Math.random() * ALPHA_NUMERIC_STRING.length()))
25-
+ ALPHA_NUMERIC_STRING.charAt((int) (Math.random() * ALPHA_NUMERIC_STRING.length()));
26-
return setupId;
20+
return randomAlphaNumeric(4);
2721
}
2822

2923
private static byte[] calculateHash(final String input, final Digest digest) {

0 commit comments

Comments
 (0)