Examples of KeyPair


Examples of java.security.KeyPair

    putKeyPair(projectId, serviceType, METADATA_SSHKEY, sshKeyPair);
  }

  public SshKey getOrCreate(ProjectId projectId, ServiceType serviceType, String sshKeyName, String user)
      throws OpsException {
    KeyPair keyPair = findSshKey(projectId, serviceType);
    if (keyPair == null) {
      keyPair = RsaUtils.generateRsaKeyPair();
      // sshKeyPair = cloud.generateSshKeyPair(sshKeyName);
      storeSshKeyPair(projectId, serviceType, keyPair);
    }
View Full Code Here

Examples of java.security.KeyPair

            };
    }

    protected KeyPair readKeyPair()
            throws IOException {
        KeyPair kp = null;
        org.bouncycastle.openssl.PasswordFinder pFinder = makeBouncyPasswordFinder();
        PEMReader r = null;
        Object o = null;
        try {
            for (; ; ) {
View Full Code Here

Examples of java.security.KeyPair

        this.kp = kp;
        type = KeyType.fromKey(kp.getPublic());
    }

    public KeyPairWrapper(PublicKey publicKey, PrivateKey privateKey) {
        this(new KeyPair(publicKey, privateKey));
    }
View Full Code Here

Examples of java.security.KeyPair

      generator = KeyPairGenerator.getInstance(algorithm);
    } catch (NoSuchAlgorithmException e) {
      throw new IllegalStateException("Error loading crypto provider", e);
    }
    generator.initialize(keysize);
    KeyPair keyPair = generator.generateKeyPair();
    return keyPair;

  }
View Full Code Here

Examples of java.security.KeyPair

    public void init(BigInteger p, BigInteger g)
            throws GeneralSecurityException {
        this.p = p;
        this.g = g;
        generator.initialize(new DHParameterSpec(p, g));
        final KeyPair kp = generator.generateKeyPair();
        agreement.init(kp.getPrivate());
        e = ((javax.crypto.interfaces.DHPublicKey) kp.getPublic()).getY();
    }
View Full Code Here

Examples of org.apache.tuscany.das.rdb.config.KeyPair

      Relationship r, MappingWrapper wrapper) {
   
    ArrayList fkValue = new ArrayList();
    Iterator keyPairs = r.getKeyPair().iterator();
    while (keyPairs.hasNext()) {
      KeyPair pair = (KeyPair) keyPairs.next();
      String childProperty = wrapper.getColumnPropertyName(r.getPrimaryKeyTable(), pair.getForeignKeyColumn());
 
            Property p = childTable.getType().getProperty(childProperty);
      fkValue.add(childTable.get(p));
    }
View Full Code Here

Examples of org.candlepin.model.KeyPair

        when(exportRules.canExport(any(Entitlement.class))).thenReturn(Boolean.TRUE);
    }

    private KeyPair createKeyPair() {
        KeyPair cpKeyPair = null;

        try {
            KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
            generator.initialize(2048);
            java.security.KeyPair newPair = generator.generateKeyPair();
            cpKeyPair = new KeyPair(newPair.getPrivate(), newPair.getPublic());
        }
        catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of org.jboss.aerogear.crypto.keys.KeyPair

            throw new RuntimeException("Error: ", e);
        }
    }

    public SigningKey() {
        this(new KeyPair(ECDSA_ALGORITHM_NAME, DEFAULT_CURVE_NAME));
    }
View Full Code Here

Examples of org.jclouds.aws.ec2.domain.KeyPair

      return extra;
   }

   @VisibleForTesting
   String getPrivateKeyOrNull(RunningInstance instance, String tag) {
      KeyPair keyPair = credentialsMap.get(new RegionAndName(instance.getRegion(), instance
               .getKeyName()));
      return keyPair != null ? keyPair.getKeyMaterial() : null;
   }
View Full Code Here

Examples of org.jclouds.ec2.domain.KeyPair

      String userSuppliedKeyPair = "myKeyPair";

      // create mocks
      CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions strategy = setupStrategy();
      EC2TemplateOptions options = createMock(EC2TemplateOptions.class);
      KeyPair keyPair = createMock(KeyPair.class);

      // setup expectations
      expect(options.getKeyPair()).andReturn(userSuppliedKeyPair);
      expect(options.getLoginPrivateKey()).andReturn(null);
      expect(options.getRunScript()).andReturn(null);
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.