Package org.platformlayer.auth.crypto.SecretStore

Examples of org.platformlayer.auth.crypto.SecretStore.Writer


      PublicKey userPublicKey = user.getPublicKey();

      byte[] newSecretData;
      try {
        SecretStore store = new SecretStore(project.secretData);
        Writer writer = store.buildWriter();
        writer.writeAsymetricUserKey(projectSecretData, user.id, userPublicKey);
        writer.close();
        store.appendContents(writer);

        newSecretData = store.getEncoded();
      } catch (IOException e) {
        throw new RepositoryException("Error writing secrets", e);
View Full Code Here


      PublicKey grantToProjectPublicKey = grantToProject.getPublicKey();

      byte[] newSecretData;
      try {
        SecretStore store = new SecretStore(onProject.secretData);
        Writer writer = store.buildWriter();
        writer.writeAsymetricProjectKey(projectSecretData, grantToProject.id, grantToProjectPublicKey);
        writer.close();
        store.appendContents(writer);

        newSecretData = store.getEncoded();
      } catch (IOException e) {
        throw new RepositoryException("Error writing secrets", e);
View Full Code Here

TOP

Related Classes of org.platformlayer.auth.crypto.SecretStore.Writer

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.