Package unibg.overencrypt.client

Examples of unibg.overencrypt.client.LocalPrivateResource


   
    JFrame frame = new JFrame();
    IndefiniteProgressDialog inst = new IndefiniteProgressDialog(frame, "Logout", "Wait until logout from server...", new CancelListener(frame));
    inst.setVisible(true);

    LocalPrivateResource localPrivateResource = new LocalPrivateResource();
    try {

      userId = localPrivateResource.retrieveValue("UserInfo.userId");

      localPrivateResource.delete();

      //Send .request to insert DHKeyPairs in DB at OE Server
      boolean requestDone = OverEncryptRequest.generateRequest(ClientPrimitives.OE_LOGOUT, OverEncryptRequestType.LOCK, userId, path, userId);
      LOGGER.debug("path: " + path);
      if (requestDone) {
View Full Code Here


        returnedValues = ResponseManager.retrieveCommunication(path, ServerPrimitives.OE_UPDATE_ALL_PERMS, "friends", "userInfos", "friendsInfos");

        inst.setMessage("Your passphrase is correct");

        LOGGER.debug("lpr started");
        LocalPrivateResource lpr = new LocalPrivateResource();
        String[] keys = {"pin", "userId"};
        String[] values = {pin, userId};
        try {
          LOGGER.debug("save local user info");
          lpr.saveLocal("UserInfo", keys, values);
        } catch (Exception e) {
          LOGGER.warn("Error during save info in local resources - ",e);
        }
       
        ClientUpdatePermissionsManager.updateAllPermissions(inst, returnedValues[0], returnedValues[1], returnedValues[2], path, userId, pin);
View Full Code Here

    inpd = new IndefiniteProgressDialog(frame, "Dowload file: " + fileName, "Retrieving decryption BEL and SEL keys...", new CancelListener(frame));
    inpd.setVisible(true);

   
    //Retrieve user id from local resource
    LocalPrivateResource localPrivateResource = new LocalPrivateResource();
    try {
      userID = localPrivateResource.retrieveValue("UserInfo.userId");
    } 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

            exitWithError("Files can't be uploaded to shared folders.");
        }

        String passphrase = null;
        String userId = null;
        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

        OverEncryptClient client = new OverEncryptClient();

        String userId = null;
        String passphrase = null;

        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

    //Retrieve user id from local resource
    ClientEditPermissionsManager.path = path;
    ClientEditPermissionsManager.folderName = folderName;

    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);
    }

    //GET DECRYPTED ACL BEL & SEL
View Full Code Here

    for (int i = 0; i < jsons.length; i++) {
      LOGGER.debug("jsons[" + i + "]: " + jsons[i]);
    }

    //Retrieve user session pin
    LocalPrivateResource lpr = new LocalPrivateResource();
    String userId = "";
    String userPin = "";
    try {
      userId = lpr.retrieveValue("UserInfo.userId");
      userPin = lpr.retrieveValue("UserInfo.pin");
    } catch (Exception e) {
      LOGGER.error("Error while retrieving user pin from local private file",e);
    }

    //Temp file path
View Full Code Here

   
    //Start message dialog
    JFrame frame = new JFrame();
    inpd = new IndefiniteProgressDialog(frame, "Deleting folder", "Your folder will be deleted...", new CancelListener(frame));
    inpd.setMessage("Retrieve local resources...");
    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);
    }
    inpd.setMessage("Retieve token informations...");
   
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.