This commit is contained in:
Sebastian Stenzel
2016-02-28 18:37:55 +01:00
parent bc9b7c3a19
commit 7b68c427d6
5 changed files with 27 additions and 34 deletions
@@ -8,6 +8,8 @@
*******************************************************************************/
package org.cryptomator.filesystem.crypto;
import static org.cryptomator.filesystem.crypto.Constants.MASTERKEY_FILENAME;
import java.io.UncheckedIOException;
import javax.inject.Inject;
@@ -31,6 +33,10 @@ public class CryptoFileSystemFactory {
this.blockAlignedFileSystemFactory = blockAlignedFileSystemFactory;
}
public boolean isValidVaultStructure(Folder vaultLocation) {
return vaultLocation.file(MASTERKEY_FILENAME).exists();
}
public void initializeNew(Folder vaultLocation, CharSequence passphrase) {
masterkeys.initialize(vaultLocation, passphrase);
}