Package org.apache.ws.security.conversation.dkalgo

Examples of org.apache.ws.security.conversation.dkalgo.DerivationAlgorithm.createKey()


           
            byte[] seed = new byte[labelBytes.length + nonce.length];
            System.arraycopy(labelBytes, 0, seed, 0, labelBytes.length);
            System.arraycopy(nonce, 0, seed, labelBytes.length, nonce.length);
           
            this.keyBytes = algo.createKey(this.secret, seed, offset, length);
           
        } catch (Exception e) {
            throw new WSSecurityException(e.getMessage(), e);
        }
    }
View Full Code Here


        System.arraycopy(label, 0, seed, 0, label.length);
        System.arraycopy(nonce, 0, seed, label.length, nonce.length);
       
        DerivationAlgorithm algo = AlgoFactory.getInstance(ConversationConstants.DerivationAlgorithm.P_SHA_1);
       
        this.derivedKeyBytes = algo.createKey(this.ephemeralKey, seed, offset, length);
       
       
        //Add the DKTs
        dkt = new DerivedKeyToken(document);
        dktId = "derivedKeyId-" + dkt.hashCode();
View Full Code Here

        System.arraycopy(label, 0, seed, 0, label.length);
        System.arraycopy(nonce, 0, seed, label.length, nonce.length);
       
        DerivationAlgorithm algo = AlgoFactory.getInstance(ConversationConstants.DerivationAlgorithm.P_SHA_1);
       
        this.derivedKeyBytes = algo.createKey(this.ephemeralKey, seed, offset, length);
       
       
        //Add the DKTs
        dkt = new DerivedKeyToken(this.wscVersion, document);
        dktId = "derivedKeyId-" + dkt.hashCode();
View Full Code Here

           
            byte[] seed = new byte[labelBytes.length + nonce.length];
            System.arraycopy(labelBytes, 0, seed, 0, labelBytes.length);
            System.arraycopy(nonce, 0, seed, labelBytes.length, nonce.length);
           
            this.keyBytes = algo.createKey(this.secret, seed, offset, length);
           
        } catch (Exception e) {
            throw new WSSecurityException(e.getMessage(), e);
        }
    }
View Full Code Here

           
            byte[] seed = new byte[labelBytes.length + nonce.length];
            System.arraycopy(labelBytes, 0, seed, 0, labelBytes.length);
            System.arraycopy(nonce, 0, seed, labelBytes.length, nonce.length);
           
            this.keyBytes = algo.createKey(this.secret, seed, offset, length);
           
        } catch (Exception e) {
            throw new WSSecurityException(
                WSSecurityException.FAILURE, null, null, e
            );
View Full Code Here

        System.arraycopy(nonce, 0, seed, label.length, nonce.length);
       
        DerivationAlgorithm algo =
            AlgoFactory.getInstance(ConversationConstants.DerivationAlgorithm.P_SHA_1);
       
        this.derivedKeyBytes = algo.createKey(this.ephemeralKey, seed, offset, length);
       
        // Add the DKTs
        dkt = new DerivedKeyToken(this.wscVersion, document);
        dktId = wssConfig.getIdAllocator().createId("derivedKeyId-", dkt);
       
View Full Code Here

            System.arraycopy(nonce, 0, seed, labelBytes.length, nonce.length);
           
            if (length <= 0) {
                length = getLength();
            }
            return algo.createKey(secret, seed, getOffset(), length);
           
        } catch (Exception e) {
            throw new WSSecurityException(
                WSSecurityException.FAILURE, null, null, e
            );
View Full Code Here

        System.arraycopy(nonce, 0, seed, label.length, nonce.length);
       
        DerivationAlgorithm algo =
            AlgoFactory.getInstance(ConversationConstants.DerivationAlgorithm.P_SHA_1);
       
        derivedKeyBytes = algo.createKey(ephemeralKey, seed, offset, length);
       
        // Add the DKTs
        dkt = new DerivedKeyToken(wscVersion, document);
        dktId = getWsConfig().getIdAllocator().createId("DK-", dkt);
       
View Full Code Here

        System.arraycopy(label, 0, seed, 0, label.length);
        System.arraycopy(nonce, 0, seed, label.length, nonce.length);
       
        DerivationAlgorithm algo = AlgoFactory.getInstance(ConversationConstants.DerivationAlgorithm.P_SHA_1);
       
        this.derivedKeyBytes = algo.createKey(this.ephemeralKey, seed, offset, length);
       
       
        //Add the DKTs
        dkt = new DerivedKeyToken(this.wscVersion, document);
        dktId = "derivedKeyId-" + dkt.hashCode();
View Full Code Here

        System.arraycopy(nonce, 0, seed, label.length, nonce.length);
       
        DerivationAlgorithm algo =
            AlgoFactory.getInstance(ConversationConstants.DerivationAlgorithm.P_SHA_1);
       
        this.derivedKeyBytes = algo.createKey(this.ephemeralKey, seed, offset, length);
       
        // Add the DKTs
        dkt = new DerivedKeyToken(this.wscVersion, document);
        dktId = "derivedKeyId-" + dkt.hashCode();
       
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.