From 6d47f2863417dc314f6752b1527ac793e34d1e36 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Thu, 5 Jun 2025 13:15:54 +0200 Subject: [PATCH] changed shorteningThreshold to int optimize imports --- .../common/recovery/CryptoFsInitializer.java | 12 ++++++------ .../RecoveryKeyResetPasswordController.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/cryptomator/common/recovery/CryptoFsInitializer.java b/src/main/java/org/cryptomator/common/recovery/CryptoFsInitializer.java index c69e8dad8..359405d15 100644 --- a/src/main/java/org/cryptomator/common/recovery/CryptoFsInitializer.java +++ b/src/main/java/org/cryptomator/common/recovery/CryptoFsInitializer.java @@ -3,12 +3,12 @@ package org.cryptomator.common.recovery; import java.io.IOException; import java.nio.file.Path; -import javafx.beans.property.IntegerProperty; - -import org.cryptomator.common.Constants; import org.cryptomator.cryptofs.CryptoFileSystemProperties; import org.cryptomator.cryptofs.CryptoFileSystemProvider; -import org.cryptomator.cryptolib.api.*; +import org.cryptomator.cryptolib.api.Masterkey; +import org.cryptomator.cryptolib.api.CryptorProvider; +import org.cryptomator.cryptolib.api.CryptoException; +import org.cryptomator.cryptolib.api.MasterkeyLoader; import static org.cryptomator.common.Constants.DEFAULT_KEY_ID; @@ -18,7 +18,7 @@ public final class CryptoFsInitializer { public static void init(Path recoveryPath, Masterkey masterkey, - IntegerProperty shorteningThreshold, + int shorteningThreshold, CryptorProvider.Scheme scheme) throws IOException, CryptoException { MasterkeyLoader loader = ignored -> masterkey.copy(); @@ -26,7 +26,7 @@ public final class CryptoFsInitializer { .cryptoFileSystemProperties() // .withCipherCombo(scheme) // .withKeyLoader(loader) // - .withShorteningThreshold(shorteningThreshold.get()) // + .withShorteningThreshold(shorteningThreshold) // .build(); CryptoFileSystemProvider.initialize(recoveryPath, fsProps, DEFAULT_KEY_ID); } diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java index fd19c44f7..206111114 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java @@ -120,7 +120,7 @@ public class RecoveryKeyResetPasswordController implements FxController { Path masterkeyFilePath = recoveryPath.resolve(MASTERKEY_FILENAME); try (Masterkey masterkey = MasterkeyService.load(masterkeyFileAccess, masterkeyFilePath, newPasswordController.passwordField.getCharacters())) { - CryptoFsInitializer.init(recoveryPath, masterkey, shorteningThreshold, cipherCombo.get()); + CryptoFsInitializer.init(recoveryPath, masterkey, shorteningThreshold.get(), cipherCombo.get()); } recoveryDirectory.moveRecoveredFiles();