Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.SecretInfo


      int id = entity.id;
      String key = entity.key;
      int stateCode = entity.state;
      byte[] data = entity.data;

      SecretInfo secret = new SecretInfo(entity.secret);
      CryptoKey itemSecret = secretProvider.getItemSecret(secret);

      if (itemSecret == null) {
        throw new RepositoryException("Could not get secret to decrypt item");
      }

      if (itemSecret instanceof AesCryptoKey) {
        log.warn("Legacy AES crypto key on {} {} {} {}",
            new Object[] { project, serviceType, itemType, entity });
      }

      secret.unlock(itemSecret);

      byte[] plaintext = FathomdbCrypto.decrypt(itemSecret, data);
      String xml = new String(plaintext, Charsets.UTF_8);

      T model = (T) jaxb.unmarshal(xml);
View Full Code Here

TOP

Related Classes of org.platformlayer.core.model.SecretInfo

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.