Package org.apache.wss4j.common.derivedKey

Examples of org.apache.wss4j.common.derivedKey.DerivationAlgorithm.createKey()


                secret = passwordCallback.getKey();
            } else {
                secret = wrappingSecurityToken.getSecretKey("").getEncoded();
            }

            final byte[] derivedKeyBytes = derivationAlgorithm.createKey(secret, seed, offset, length);

            final GenericOutboundSecurityToken derivedKeySecurityToken =
                    new GenericOutboundSecurityToken(wsuIdDKT, WSSecurityTokenConstants.DerivedKeyToken) {

                @Override
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(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.ErrorCode.FAILURE, e
            );
View Full Code Here

                    secret = passwordCallback.getKey();
                } else {
                    secret = wrappingSecurityToken.getSecretKey("").getEncoded();
                }

                derivedKeyBytes = derivationAlgorithm.createKey(secret, seed, offset, length);
            } catch (ConversationException e) {
                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);
            }

            final GenericOutboundSecurityToken derivedKeySecurityToken =
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.ErrorCode.FAILURE, e
            );
View Full Code Here

                    secret = passwordCallback.getKey();
                } else {
                    secret = wrappingSecurityToken.getSecretKey("").getEncoded();
                }

                derivedKeyBytes = derivationAlgorithm.createKey(secret, seed, offset, length);
            } catch (ConversationException e) {
                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);
            }

            final GenericOutboundSecurityToken derivedKeySecurityToken =
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(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.ErrorCode.FAILURE, 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.