summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/authentication/EcpAuthenticator.java4
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/authentication/FingerprintManager.java10
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/window/DisclaimerWindow.java2
-rwxr-xr-xdozentenmodul/src/main/java/org/openslx/dozmod/gui/window/PrivacyNoticeWindow.java2
4 files changed, 9 insertions, 9 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/EcpAuthenticator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/EcpAuthenticator.java
index 93105e91..bed848f2 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/EcpAuthenticator.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/EcpAuthenticator.java
@@ -5,10 +5,10 @@ import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
+import java.util.Base64;
import java.util.List;
import java.util.Map.Entry;
-import org.apache.commons.codec.binary.Base64;
import org.apache.hc.client5.http.ClientProtocolException;
import org.apache.hc.core5.http.ParseException;
import org.apache.logging.log4j.LogManager;
@@ -75,7 +75,7 @@ public class EcpAuthenticator implements Authenticator {
List<Satellite> sats = new ArrayList<>();
// TODO: Handle cert fingerprint
if (response.satellites2 != null) {
- Base64 base64 = new Base64();
+ Base64.Decoder base64 = Base64.getDecoder();
for (Entry<String, JSatellite> it : response.satellites2.entrySet()) {
JSatellite jsat = it.getValue();
ByteBuffer hash = jsat.certHash == null ? null
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/FingerprintManager.java b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/FingerprintManager.java
index 5980b664..e41e4f28 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/FingerprintManager.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/FingerprintManager.java
@@ -4,9 +4,9 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.util.Base64;
import java.util.Properties;
-import org.apache.commons.codec.binary.Base64;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openslx.dozmod.Config;
@@ -36,13 +36,13 @@ public class FingerprintManager {
public static void saveSuggestedFingerprint(String address, byte[] fingerprint) {
saveFingerprint(address, fingerprint, false);
- prop.setProperty(address + "_master", Base64.encodeBase64String(fingerprint));
+ prop.setProperty(address + "_master", Base64.getEncoder().encodeToString(fingerprint));
store();
}
private static boolean saveFingerprint(String address, byte[] fingerprint, boolean replace) {
if (replace || !prop.containsKey(address)) {
- prop.setProperty(address, Base64.encodeBase64String(fingerprint));
+ prop.setProperty(address, Base64.getEncoder().encodeToString(fingerprint));
return true;
}
return false;
@@ -63,7 +63,7 @@ public class FingerprintManager {
* @return fingerprint, null if unknown
*/
public static byte[] getKnownFingerprint(String address) {
- return Base64.decodeBase64(prop.getProperty(address));
+ return Base64.getDecoder().decode(prop.getProperty(address));
}
/**
@@ -74,7 +74,7 @@ public class FingerprintManager {
* @return fingerprint, null if unknown
*/
public static byte[] getSuggestedFingerprint(String address) {
- return Base64.decodeBase64(prop.getProperty(address + "_master"));
+ return Base64.getDecoder().decode(prop.getProperty(address + "_master"));
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/DisclaimerWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/DisclaimerWindow.java
index 97128e75..18fc305d 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/DisclaimerWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/DisclaimerWindow.java
@@ -9,8 +9,8 @@ import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-import org.apache.commons.codec.binary.Hex;
import org.apache.commons.io.IOUtils;
+import org.apache.hc.client5.http.utils.Hex;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openslx.dozmod.Config;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/PrivacyNoticeWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/PrivacyNoticeWindow.java
index 0ed4ee53..d08ddd98 100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/PrivacyNoticeWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/PrivacyNoticeWindow.java
@@ -9,8 +9,8 @@ import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-import org.apache.commons.codec.binary.Hex;
import org.apache.commons.io.IOUtils;
+import org.apache.hc.client5.http.utils.Hex;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openslx.dozmod.Config;