Examples of deriveKey()


Examples of org.apache.wss4j.dom.message.token.DerivedKeyToken.deriveKey()

        String tempNonce = dkt.getNonce();
        if (tempNonce == null) {
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty", "Missing wsc:Nonce value");
        }
        int length = dkt.getLength();
        byte[] keyBytes = dkt.deriveKey(length, secret);
        WSSecurityEngineResult result =
            new WSSecurityEngineResult(WSConstants.DKT, null, keyBytes, null);
        wsDocInfo.addTokenElement(elem);
        result.put(WSSecurityEngineResult.TAG_ID, dkt.getID());
        result.put(WSSecurityEngineResult.TAG_DERIVED_KEY_TOKEN, dkt);
View Full Code Here

Examples of org.bitcoinj.crypto.KeyCrypterScrypt.deriveKey()

            final int targetTimeMsec = 2000;

            int iterations = 16384;
            KeyCrypterScrypt scrypt = new KeyCrypterScrypt(iterations);
            long now = System.currentTimeMillis();
            scrypt.deriveKey(password);
            long time = System.currentTimeMillis() - now;
            log.info("Initial iterations took {} msec", time);

            // N can only be a power of two, so we keep shifting both iterations and doubling time taken
            // until we are in sorta the right general area.
View Full Code Here

Examples of org.jboss.seam.security.crypto.PBKDF2.deriveKey()

            passwordKeySpec.clearPassword();
            return BinTools.bin2hex(passwordKey.getEncoded());
        } else {
            PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
            PBKDF2 pbkdf2 = new PBKDF2Engine(params);
            return BinTools.bin2hex(pbkdf2.deriveKey(new String(password)));
        }
    }

    public String getHashAlgorithm() {
        return hashAlgorithm;
View Full Code Here

Examples of org.jboss.seam.security.crypto.PBKDF2.deriveKey()

      }
      else
      {
         PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
         PBKDF2 pbkdf2 = new PBKDF2Engine(params);
         return BinTools.bin2hex(pbkdf2.deriveKey(new String(password)));
      }
   }
  
   public String getHashAlgorithm()
   {
View Full Code Here

Examples of org.jboss.seam.security.crypto.PBKDF2Engine.deriveKey()

            passwordKeySpec.clearPassword();
            return BinTools.bin2hex(passwordKey.getEncoded());
        } else {
            PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
            PBKDF2 pbkdf2 = new PBKDF2Engine(params);
            return BinTools.bin2hex(pbkdf2.deriveKey(new String(password)));
        }
    }

    public String getHashAlgorithm() {
        return hashAlgorithm;
View Full Code Here

Examples of org.jboss.seam.security.crypto.PBKDF2Engine.deriveKey()

      }
      else
      {
         PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
         PBKDF2 pbkdf2 = new PBKDF2Engine(params);
         return BinTools.bin2hex(pbkdf2.deriveKey(new String(password)));
      }
   }
  
   public String getHashAlgorithm()
   {
View Full Code Here

Examples of org.jfree.resourceloader.ResourceManager.deriveKey()

        final ResourceManager resourceManager = getRootHandler().getResourceManager();

        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "styles.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, OfficeStylesCollection.class);
            final OfficeStylesCollection styles =
                    (OfficeStylesCollection) resource.getResource();
            if (styles != null)
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceBundleLoader.deriveKey()

        bundleKey.getFactoryParameters().get(new FactoryParameterKey("repository-loader"));
    if (o == null)
    {
      throw new ResourceKeyCreationException("Unable to create a inner-bundle key, no loader available.");
    }
    return o.deriveKey(getBundleMainKey(), entryName, factoryParameters);
  }

  public ResourceKey getBundleKey()
  {
    return getBundleMainKey();
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

    }

    try
    {
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey key = resourceManager.deriveKey(getRootHandler().getSource(), href);
      final Resource resource = resourceManager.create(key, null, MasterReport.class);
      report = (MasterReport) resource.getResource();
    }
    catch (ResourceException re)
    {
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.deriveKey()

      final ResourceKey key = getRootHandler().getSource();
      final ResourceManager manager = getRootHandler().getResourceManager();
      try
      {
        final ResourceKey derivedKey = manager.deriveKey(key, href);
        final Resource resource = manager.create(derivedKey, null, DataFactory.class);
        getRootHandler().getDependencyCollector().add(resource);
        dataFactory = (DataFactory) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
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.