Skip to content

Commit

Permalink
Uses Windows username as key
Browse files Browse the repository at this point in the history
Fixes #601
  • Loading branch information
1-alex98 committed Oct 15, 2017
1 parent d6ff28a commit 8c40e04
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/main/java/com/faforever/client/preferences/LoginPrefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,14 @@
import javafx.beans.property.StringProperty;
import lombok.extern.slf4j.Slf4j;

import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets;
import java.util.Base64;

@Slf4j
public class LoginPrefs {

private static final String KEY;
public class LoginPrefs {

static {
try {
KEY = new String(NetworkInterface.getByInetAddress(InetAddress.getLocalHost()).getHardwareAddress(), StandardCharsets.US_ASCII);
} catch (SocketException | UnknownHostException e) {
throw new UnsupportedOperationException("No socket available");
}
}
private static final String KEY = System.getProperty("user.name");

private final StringProperty username;
private final StringProperty password;
Expand Down

0 comments on commit 8c40e04

Please sign in to comment.