Merge remote-tracking branch 'origin/passwords' into passwords
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
# Conflicts: # src/de/steamwar/sql/SteamwarUser.java
Dieser Commit ist enthalten in:
Commit
c20a426bff
@ -297,7 +297,7 @@ public class SteamwarUser {
|
|||||||
random.nextBytes(salt);
|
random.nextBytes(salt);
|
||||||
String saltString = Base64.getEncoder().encodeToString(salt);
|
String saltString = Base64.getEncoder().encodeToString(salt);
|
||||||
|
|
||||||
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 65536, 128);
|
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 65536, 512);
|
||||||
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512");
|
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512");
|
||||||
byte[] hash = factory.generateSecret(spec).getEncoded();
|
byte[] hash = factory.generateSecret(spec).getEncoded();
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ public class SteamwarUser {
|
|||||||
String saltString = parts[1];
|
String saltString = parts[1];
|
||||||
byte[] salt = Base64.getDecoder().decode(saltString);
|
byte[] salt = Base64.getDecoder().decode(saltString);
|
||||||
|
|
||||||
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 65536, 128);
|
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 65536, 512);
|
||||||
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512");
|
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512");
|
||||||
byte[] hash = factory.generateSecret(spec).getEncoded();
|
byte[] hash = factory.generateSecret(spec).getEncoded();
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren