Package org.hive2hive.core.security

Examples of org.hive2hive.core.security.EncryptedNetworkContent.generateVersionKey()


      logger.trace("Encrypting user profile with 256bit AES key from password. user id ='{}'", credentials.getUserId());
      EncryptedNetworkContent encryptedUserProfile = H2HEncryptionUtil.encryptAES(entry.getUserProfile(),
          userProfileEncryptionKey);

      encryptedUserProfile.setBasedOnKey(entry.getUserProfile().getVersionKey());
      encryptedUserProfile.generateVersionKey();

      IParameters parameters = new Parameters().setLocationKey(credentials.getProfileLocationKey())
          .setContentKey(H2HConstants.USER_PROFILE).setVersionKey(encryptedUserProfile.getVersionKey())
          .setData(encryptedUserProfile).setProtectionKeys(entry.getUserProfile().getProtectionKeys())
          .setTTL(entry.getUserProfile().getTimeToLive());
View Full Code Here


    } catch (DataLengthException | IllegalStateException | InvalidCipherTextException | IOException e) {
      throw new ProcessExecutionException("User profile could not be encrypted.");
    }

    try {
      encryptedProfile.generateVersionKey();
    } catch (IOException e) {
      throw new ProcessExecutionException("User profile version key could not be generated.", e);
    }

    // assign ttl value
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.