Add PWs #61

Zusammengeführt
Lixfel hat 6 Commits von passwords nach master 2024-01-06 16:32:44 +01:00 zusammengeführt
Nur Änderungen aus Commit efd7f27c60 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -23,19 +23,17 @@ import de.steamwar.sql.internal.*;
import lombok.Getter;
import lombok.SneakyThrows;
import javax.crypto.Mac;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.sql.Timestamp;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.stream.Collectors;
public class SteamwarUser {
private static final SecureRandom random = new SecureRandom();
static {
new SqlTypeMapper<>(UUID.class, "CHAR(36)", (rs, identifier) -> UUID.fromString(rs.getString(identifier)), (st, index, value) -> st.setString(index, value.toString()));
@ -292,7 +290,6 @@ public class SteamwarUser {
@SneakyThrows
public void setPassword(String password) {
SecureRandom random = new SecureRandom();
byte[] salt = new byte[16];
random.nextBytes(salt);
String saltString = Base64.getEncoder().encodeToString(salt);