Package org.cryptomator.cryptofs
Class CryptoFileSystemProperties
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- org.cryptomator.cryptofs.CryptoFileSystemProperties
-
public class CryptoFileSystemProperties extends AbstractMap<String,Object>
Properties to pass to- Author:
- Markus Kreusch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCryptoFileSystemProperties.BuilderBuildsCryptoFileSystemPropertiesstatic classCryptoFileSystemProperties.FileSystemFlags-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_FILESYSTEM_FLAGSKey identifying the filesystem flags.static StringPROPERTY_MASTERKEY_FILENAMEKey identifying the name of the masterkey file located inside the vault directory.static StringPROPERTY_PASSPHRASEKey identifying the passphrase for an encrypted vault.static StringPROPERTY_PEPPERKey identifying the pepper used during key derivation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CryptoFileSystemProperties.BuildercryptoFileSystemProperties()Starts construction ofCryptoFileSystemPropertiesstatic CryptoFileSystemProperties.BuildercryptoFileSystemPropertiesFrom(Map<String,?> properties)Starts construction ofCryptoFileSystemPropertiesSet<Map.Entry<String,Object>>entrySet()Set<CryptoFileSystemProperties.FileSystemFlags>flags()booleanreadonly()static CryptoFileSystemProperties.BuilderwithPassphrase(CharSequence passphrase)Starts construction ofCryptoFileSystemProperties.static CryptoFileSystemPropertieswrap(Map<String,?> properties)ConstructsCryptoFileSystemPropertiesfrom aMap.-
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
PROPERTY_PASSPHRASE
public static final String PROPERTY_PASSPHRASE
Key identifying the passphrase for an encrypted vault.- See Also:
- Constant Field Values
-
PROPERTY_PEPPER
public static final String PROPERTY_PEPPER
Key identifying the pepper used during key derivation.- Since:
- 1.3.2
- See Also:
- Constant Field Values
-
PROPERTY_MASTERKEY_FILENAME
public static final String PROPERTY_MASTERKEY_FILENAME
Key identifying the name of the masterkey file located inside the vault directory.- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
PROPERTY_FILESYSTEM_FLAGS
public static final String PROPERTY_FILESYSTEM_FLAGS
Key identifying the filesystem flags.- Since:
- 1.3.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
flags
public Set<CryptoFileSystemProperties.FileSystemFlags> flags()
-
readonly
public boolean readonly()
-
cryptoFileSystemProperties
public static CryptoFileSystemProperties.Builder cryptoFileSystemProperties()
Starts construction ofCryptoFileSystemProperties- Returns:
- a
CryptoFileSystemProperties.Builderwhich can be used to constructCryptoFileSystemProperties
-
withPassphrase
public static CryptoFileSystemProperties.Builder withPassphrase(CharSequence passphrase)
Starts construction ofCryptoFileSystemProperties. Convenience function forcryptoFileSystemProperties().withPassphrase(passphrase).- Parameters:
passphrase- the passphrase to use- Returns:
- a
CryptoFileSystemProperties.Builderwhich can be used to constructCryptoFileSystemProperties - Since:
- 1.4.0
-
cryptoFileSystemPropertiesFrom
public static CryptoFileSystemProperties.Builder cryptoFileSystemPropertiesFrom(Map<String,?> properties)
Starts construction ofCryptoFileSystemProperties- Parameters:
properties- aMapcontaining properties used to initialize the builder- Returns:
- a
CryptoFileSystemProperties.Builderwhich can be used to constructCryptoFileSystemPropertiesand has been initialized with the values from properties
-
wrap
public static CryptoFileSystemProperties wrap(Map<String,?> properties)
ConstructsCryptoFileSystemPropertiesfrom aMap.- Parameters:
properties- theMapto convert- Returns:
- the passed in
Mapif already of typeCryptoFileSystemPropertiesor a newCryptoFileSystemPropertiesinstance holding the values from theMap - Throws:
IllegalArgumentException- if a value in theMapdoes not have the expected type or if a required value is missing
-
-