use of org.cryptomator.cryptofs.CryptoFileSystem in project cryptomator by cryptomator.
the class Vault method createCryptoFileSystem.
private CryptoFileSystem createCryptoFileSystem(CharSequence passphrase) throws IOException, CryptoException {
CryptoFileSystemProperties fsProps = //
CryptoFileSystemProperties.cryptoFileSystemProperties().withPassphrase(//
passphrase).withMasterkeyFilename(//
MASTERKEY_FILENAME).build();
CryptoFileSystem fs = CryptoFileSystemProvider.newFileSystem(getPath(), fsProps);
closer.closeLater(fs);
return fs;
}
use of org.cryptomator.cryptofs.CryptoFileSystem in project cryptomator by cryptomator.
the class Vault method lock.
public synchronized void lock() throws Exception {
if (servlet != null) {
servlet.stop();
}
CryptoFileSystem fs = cryptoFileSystem.getAndSet(null);
if (fs != null) {
fs.close();
}
Platform.runLater(() -> {
unlocked.set(false);
});
}
Aggregations