feat: added config file
Some checks are pending
Build and test / build-and-test (push) Waiting to run

This commit is contained in:
Yui
2024-12-01 16:40:14 -03:00
parent 354f647e54
commit b8da1ca68e
5 changed files with 25 additions and 9 deletions

View File

@@ -36,8 +36,10 @@ public class WSServer extends WebSocketServer {
public WSServer(InetSocketAddress address, String authToken) throws NoSuchAlgorithmException {
super(address);
this._authToken = MessageDigest.getInstance("SHA-256")
.digest(authToken.getBytes(StandardCharsets.UTF_8));
if (!authToken.isEmpty()) {
this._authToken = MessageDigest.getInstance("SHA-256")
.digest(authToken.getBytes(StandardCharsets.UTF_8));
}
}
@Override