mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-17 22:28:13 +01:00
update base64
This commit is contained in:
parent
53fcfb5b43
commit
350ab53563
@ -1,7 +1,6 @@
|
||||
package fr.xephi.authme.cache.backup;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import com.google.common.io.Files;
|
||||
import com.google.gson.*;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
@ -14,6 +13,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.util.io.BukkitObjectInputStream;
|
||||
import org.bukkit.util.io.BukkitObjectOutputStream;
|
||||
import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@ -133,7 +133,7 @@ public class JsonCache {
|
||||
BukkitObjectOutputStream objectOut = new BukkitObjectOutputStream(baos);
|
||||
objectOut.writeObject(item);
|
||||
objectOut.close();
|
||||
val.addProperty("item", BaseEncoding.base64().encode(baos.toByteArray()));
|
||||
val.addProperty("item", Base64Coder.encodeLines(baos.toByteArray()));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
@ -187,7 +187,7 @@ public class JsonCache {
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JsonObject item = arr.get(i).getAsJsonObject();
|
||||
String encoded = item.get("item").getAsString();
|
||||
byte[] decoded = BaseEncoding.base64().decode(encoded);
|
||||
byte[] decoded = Base64Coder.decode(encoded);
|
||||
try {
|
||||
ByteArrayInputStream baos = new ByteArrayInputStream(decoded);
|
||||
BukkitObjectInputStream objectIn = new BukkitObjectInputStream(baos);
|
||||
|
@ -172,7 +172,6 @@ public class AsyncronousJoin {
|
||||
|
||||
}
|
||||
if (Settings.protectInventoryBeforeLogInEnabled) {
|
||||
try {
|
||||
LimboPlayer limbo = LimboCache.getInstance().getLimboPlayer(player.getName().toLowerCase());
|
||||
ProtectInventoryEvent ev = new ProtectInventoryEvent(player, limbo.getInventory(), limbo.getArmour());
|
||||
plugin.getServer().getPluginManager().callEvent(ev);
|
||||
@ -191,9 +190,6 @@ public class AsyncronousJoin {
|
||||
|
||||
});
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
String[] msg;
|
||||
if (Settings.emailRegistration) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
package fr.xephi.authme.security.crypts;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import fr.xephi.authme.security.pbkdf2.PBKDF2Engine;
|
||||
import fr.xephi.authme.security.pbkdf2.PBKDF2Parameters;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
public class CryptPBKDF2Django implements EncryptionMethod {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user