Merge remote-tracking branch 'origin/master' into packet-system
# Conflicts: # SpigotCore_Main/src/de/steamwar/sql/DownloadSchematic.java
Dieser Commit ist enthalten in:
Commit
00b9809cde
@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
package de.steamwar.sql;
|
package de.steamwar.sql;
|
||||||
|
|
||||||
|
import com.google.common.io.BaseEncoding;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
||||||
import javax.xml.bind.DatatypeConverter;
|
|
||||||
|
|
||||||
public class DownloadSchematic {
|
public class DownloadSchematic {
|
||||||
private DownloadSchematic(){}
|
private DownloadSchematic(){}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ public class DownloadSchematic {
|
|||||||
}
|
}
|
||||||
cript.reset();
|
cript.reset();
|
||||||
cript.update((Instant.now().toString() + schem.getSchemOwner() + schem.getSchemID()).getBytes());
|
cript.update((Instant.now().toString() + schem.getSchemOwner() + schem.getSchemID()).getBytes());
|
||||||
String hash = DatatypeConverter.printHexBinary(cript.digest());
|
String hash = BaseEncoding.base16().encode(cript.digest());
|
||||||
SQL.update("INSERT INTO SchemDownload (SchemID, Link) VALUES (?, ?)", schem.getSchemID(), hash);
|
SQL.update("INSERT INTO SchemDownload (SchemID, Link) VALUES (?, ?)", schem.getSchemID(), hash);
|
||||||
return BASE + hash;
|
return BASE + hash;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren