Package org.syncany.config.to

Examples of org.syncany.config.to.MasterTO


    // Save config.xml and repo file
    if (options.isEncryptionEnabled()) {
      SaltedSecretKey masterKey = createMasterKeyFromPassword(masterKeyPassword); // This takes looong!
      options.getConfigTO().setMasterKey(masterKey);

      new MasterTO(masterKey.getSalt()).save(masterFile);
      options.getRepoTO().save(repoFile, options.getCipherSpecs(), masterKey);
    }
    else {
      options.getRepoTO().save(repoFile);
    }
View Full Code Here


    tmpRepoFile.delete();

    // Write file 'master'
    if (configTO.getMasterKey() != null) {
      File masterFile = new File(appDir, Config.FILE_MASTER);
      new MasterTO(configTO.getMasterKey().getSalt()).save(masterFile);
    }

    // Shutdown plugin
    transferManager.disconnect();
View Full Code Here

    }
  }

  private SaltedSecretKey askPasswordAndCreateMasterKey() throws CipherException, StorageException {
    File tmpMasterFile = downloadFile(transferManager, new MasterRemoteFile());
    MasterTO masterTO = readMasterFile(tmpMasterFile);

    tmpMasterFile.delete();

    String masterKeyPassword = getOrAskPassword();
    byte[] masterKeySalt = masterTO.getSalt();

    return createMasterKeyFromPassword(masterKeyPassword, masterKeySalt); // This takes looong!
  }
View Full Code Here

TOP

Related Classes of org.syncany.config.to.MasterTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.