Package unibg.overencrypt.client

Examples of unibg.overencrypt.client.LocalPrivateResource


    public String[] getDecryptedACL(String folderName, OperationType type) {

        // Retrieve user id and passphrase from local resource
        String userID = "";
        String passphrase = "";
        LocalPrivateResource lpr = new LocalPrivateResource();
        try {
            userID = lpr.get("UserInfo", "userId");
            passphrase = lpr.get("UserInfo", "pin");
            passphrase = SecurityAlgorithms.decryptAES(passphrase);
        } catch (Exception e) {
            // TODO ??
        }
View Full Code Here


            String encryptionLevel, boolean isUpload) {

        OverEncryptClient client = new OverEncryptClient();

        // Retrieve user id and passphrase from local resource
        LocalPrivateResource localPrivateResource = new LocalPrivateResource();
        String userID = "";
        String passphrase = "";
        try {
            userID = localPrivateResource.get("UserInfo", "userId");
            passphrase = localPrivateResource.get("UserInfo", "pin");
            passphrase = SecurityAlgorithms.decryptAES(passphrase);
        } catch (Exception e) {
            // TODO ??
        }
View Full Code Here

        String destinationPath = options.nonOptionArguments().get(3) + fileName;

        logger.debug(destinationPath);

        String userID = null;
        LocalPrivateResource lpr = new LocalPrivateResource();
        try {
            userID = lpr.get("UserInfo", "userId");
        } catch (Exception e) {
            e.printStackTrace();
        }

        String grandParentPath = path.substring(0, path.length() - 1);
View Full Code Here

            return;
        }

        String owner = null;
        String passphrase = null;
        LocalPrivateResource lpr = new LocalPrivateResource();
        try {
            owner = lpr.get("UserInfo", "userId");
            passphrase = lpr.get("UserInfo", "pin");
            passphrase = SecurityAlgorithms.decryptAES(passphrase);
        } catch (Exception e) {
            // TODO ??
        }
View Full Code Here

        String passphrase = null;
        String aclUsers;
        String json = null;
        OverEncryptClient client = new OverEncryptClient();

        LocalPrivateResource lpr = new LocalPrivateResource();
        try {
            userId = lpr.get("UserInfo", "userId");
            passphrase = lpr.get("UserInfo", "pin");
            passphrase = SecurityAlgorithms.decryptAES(passphrase);
        } catch (Exception e) {
            // TODO Error
        }
View Full Code Here

      String tempFilePath = ClientConfiguration.getLOCAL_PRIVATE_RESOURCES_PATH() + "/dhkeys.txt";

      dhKeyPairsCreation(tempFilePath, String.valueOf(pinField.getPassword()));

      //Save PIN and userID in local private resource
      LocalPrivateResource lpr = new LocalPrivateResource();
      String[] keys = {"pin", "userId"};
      String[] values = {String.valueOf(pinField.getPassword()), userId};
      try {
        lpr.saveLocal("UserInfo", keys, values);
      } catch (Exception e) {
        LOGGER.warn("Error during save info in local resources - " + e.getMessage());
      }
      String dhkeypairs = FileSystemUtils.readPrivateFile("dhkeys.txt");
     
View Full Code Here

    JFrame frame = new JFrame();
    IndefiniteProgressDialog inpd = new IndefiniteProgressDialog(frame, "File encryption process", "Encrypting file...", new CancelListener(frame));
    inpd.setVisible(true);

    inpd.setMessage("Retrieve local resources...");
    LocalPrivateResource localPrivateResource = new LocalPrivateResource();
    try {
      passphrase = localPrivateResource.retrieveValue("UserInfo.pin");
      userId = localPrivateResource.retrieveValue("UserInfo.userId");
    } catch (Exception e) {
      LOGGER.error("Error while retrieving user id from local private file - " + e.getMessage());
    }

    inpd.setMessage("Retrieve token resource...");
View Full Code Here

    folderName = folderField.getText();
    hasSEL = hasSELBox.isSelected();

    JFrame frame = new JFrame();
    IndefiniteProgressDialog inpd = new IndefiniteProgressDialog(frame, "Creating new folder...", "Retrieving your friends...", new CancelListener(frame));
    LocalPrivateResource localPrivateResource = new LocalPrivateResource();
    try {
      owner = localPrivateResource.retrieveValue("UserInfo.userId");
      passphrase = localPrivateResource.retrieveValue("UserInfo.pin");
    } catch (Exception e) {
      LOGGER.error("Error while retrieving user id from local private file - " + e.getMessage());
    }

    Finder.showFinder(folderPath, owner, null, OperationType.UPLOAD);
View Full Code Here

    String userId = "";
    String passphrase = "";

    //Retrieve user id and passphrase from local resource
    LocalPrivateResource localPrivateResource = new LocalPrivateResource();
    try {
      userId = localPrivateResource.retrieveValue("UserInfo.userId");
      passphrase = localPrivateResource.retrieveValue("UserInfo.pin");
    } catch (Exception e) {
      LOGGER.error("Error while retrieving user id from local private file - ",e);
    }

    // Send current logged id to server
View Full Code Here

    String userID = "";
    String passphrase = "";

    //Retrieve user id and passphrase from local resource
    LocalPrivateResource localPrivateResource = new LocalPrivateResource();
    try {
      userID = localPrivateResource.retrieveValue("UserInfo.userId");
      passphrase = localPrivateResource.retrieveValue("UserInfo.pin");
    } catch (Exception e) {
      LOGGER.error("Error while retrieving user id from local private file - ",e);
    }
    LOGGER.debug("User logged id: " + userID);
View Full Code Here

TOP

Related Classes of unibg.overencrypt.client.LocalPrivateResource

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.