Packet System + Bungee GUI #59
@ -19,14 +19,14 @@
|
||||
|
||||
package de.steamwar.sql;
|
||||
|
||||
import com.google.common.io.BaseEncoding;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
public class DownloadSchematic {
|
||||
private DownloadSchematic(){}
|
||||
|
||||
@ -49,7 +49,7 @@ public class DownloadSchematic {
|
||||
}
|
||||
cript.reset();
|
||||
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);
|
||||
return BASE + hash;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Nenene, keinen DatatypeConverter bitte mehr! (einfach mal bitte den neuen master reinmergen)