Examples of KeyFactory


Examples of java.security.KeyFactory

        // set up the keys
        //
        PrivateKey          privKey;
        PublicKey           pubKey;
   
        KeyFactory  kFact = KeyFactory.getInstance("RSA", "BC");
   
        privKey = kFact.generatePrivate(RSA_PRIVATE_KEY_SPEC);
        pubKey = kFact.generatePublic(pubKeySpec);
       
        X509V2AttributeCertificateGenerator gen = new X509V2AttributeCertificateGenerator();
       
        // the actual attributes
        GeneralName roleName = new GeneralName(GeneralName.rfc822Name, "DAU123456789");
View Full Code Here

Examples of org.apache.giraph.io.gora.utils.KeyFactory

   * @return List<InputSplit> A list of splits
   */
  @Override
  public List<InputSplit> getSplits(JobContext context, int minSplitCountHint)
    throws IOException, InterruptedException {
    KeyFactory kFact = null;
    try {
      kFact = (KeyFactory) getKeyFactoryClass().newInstance();
    } catch (InstantiationException e) {
      LOG.error("Key factory was not instantiated. Please verify.");
      LOG.error(e.getMessage());
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      LOG.error("Key factory was not instantiated. Please verify.");
      LOG.error(e.getMessage());
      e.printStackTrace();
    }
    String sKey = GIRAPH_GORA_START_KEY.get(getConf());
    String eKey = GIRAPH_GORA_END_KEY.get(getConf());
    if (sKey == null || sKey.isEmpty()) {
      LOG.warn("No start key has been defined.");
      LOG.warn("Querying all the data store.");
      sKey = null;
      eKey = null;
    }
    kFact.setDataStore(getDataStore());
    setStartKey(kFact.buildKey(sKey));
    setEndKey(kFact.buildKey(eKey));
    QueryBase tmpQuery = GoraUtils.getQuery(
        getDataStore(), getStartKey(), getEndKey());
    tmpQuery.setConf(context.getConfiguration());
    GORA_INPUT_FORMAT.setQuery(tmpQuery);
    List<InputSplit> splits = GORA_INPUT_FORMAT.getSplits(context);
View Full Code Here

Examples of org.hdiv.cipher.KeyFactory

    return pageIdGenerator;
  }

  @Bean
  public IKeyFactory keyFactory() {
    KeyFactory keyFactory = new KeyFactory();

    SecurityConfigBuilder builder = this.securityConfigBuilder();
    CipherConfigure config = builder.getCipherConfigure();
    if (config.getAlgorithm() != null) {
      keyFactory.setAlgorithm(config.getAlgorithm());
    }
    if (config.getKeySize() > 0) {
      keyFactory.setKeySize(config.getKeySize());
    }
    if (config.getPrngAlgorithm() != null) {
      keyFactory.setPrngAlgorithm(config.getPrngAlgorithm());
    }
    if (config.getProvider() != null) {
      keyFactory.setProvider(config.getProvider());
    }
    return keyFactory;
  }
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.