Class CryptoFileSystemProperties.Builder

java.lang.Object
org.cryptomator.cryptofs.CryptoFileSystemProperties.Builder
Enclosing class:
CryptoFileSystemProperties

public static class CryptoFileSystemProperties.Builder extends Object
  • Field Details

    • cipherCombo

      public org.cryptomator.cryptolib.api.CryptorProvider.Scheme cipherCombo
  • Method Details

    • withMaxCleartextNameLength

      public CryptoFileSystemProperties.Builder withMaxCleartextNameLength(int maxCleartextNameLength)
      Sets the maximum cleartext filename length for a CryptoFileSystem. This value is checked during write operations. Read access to nodes with longer names should be unaffected. Setting this value to 0 or a negative value effectively disables write access.
      Parameters:
      maxCleartextNameLength - The maximum cleartext filename length allowed
      Returns:
      this
      Since:
      2.0.0
    • withShorteningThreshold

      public CryptoFileSystemProperties.Builder withShorteningThreshold(int shorteningThreshold)
      Sets the shortening threshold used during vault initialization.
      Parameters:
      shorteningThreshold - The maximum ciphertext filename length not to be shortened
      Returns:
      this
      Since:
      2.5.0
    • withCipherCombo

      public CryptoFileSystemProperties.Builder withCipherCombo(org.cryptomator.cryptolib.api.CryptorProvider.Scheme cipherCombo)
      Sets the cipher combo used during vault initialization.
      Parameters:
      cipherCombo - The cipher combo
      Returns:
      this
      Since:
      2.0.0
    • withKeyLoader

      public CryptoFileSystemProperties.Builder withKeyLoader(org.cryptomator.cryptolib.api.MasterkeyLoader keyLoader)
      Sets the keyloader for a CryptoFileSystem.
      Parameters:
      keyLoader - A factory creating a MasterkeyLoader capable of handling the given scheme.
      Returns:
      this
      Since:
      2.0.0
    • withFlags

      Sets the flags for a CryptoFileSystem.
      Parameters:
      flags - File system flags
      Returns:
      this
      Since:
      1.3.1
    • withFlags

      Sets the flags for a CryptoFileSystem.
      Parameters:
      flags - collection of file system flags
      Returns:
      this
      Since:
      1.3.0
    • withVaultConfigFilename

      public CryptoFileSystemProperties.Builder withVaultConfigFilename(String vaultConfigFilename)
      Sets the name of the vault config file located inside the vault directory.
      Parameters:
      vaultConfigFilename - the filename of the jwt file containing the vault configuration
      Returns:
      this
      Since:
      2.0.0
    • withMasterkeyFilename

      @Deprecated public CryptoFileSystemProperties.Builder withMasterkeyFilename(String masterkeyFilename)
      Deprecated.
      Supply a keyloader instead.
      Sets the name of the masterkey file located inside the vault directory.
      Parameters:
      masterkeyFilename - the filename of the json file containing configuration to decrypt the masterkey
      Returns:
      this
      Since:
      1.1.0
    • build

      Validates the values and creates new CryptoFileSystemProperties.
      Returns:
      a new CryptoFileSystemProperties with the values from this builder
      Throws:
      IllegalStateException - if a required value was not set on this Builder