01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the License). You may not use this file except in
05: * compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * Header Notice in each file and include the License file
14: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
15: * If applicable, add the following below the CDDL Header,
16: * with the fields enclosed by brackets [] replaced by
17: * you own identifying information:
18: * "Portions Copyrighted [year] [name of copyright owner]"
19: *
20: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
21: */
22:
23: package com.sun.xml.ws.security;
24:
25: import java.io.UnsupportedEncodingException;
26: import java.net.URI;
27: import java.security.InvalidKeyException;
28: import java.security.NoSuchAlgorithmException;
29: import javax.crypto.SecretKey;
30:
31: /**
32: * DerivedKeyToken Interface
33: * TODO: This defintion is incomplete. Currently it has only those members which are required
34: * for the Trust Interop Scenarios
35: */
36: public interface DerivedKeyToken extends Token {
37:
38: public static final String DERIVED_KEY_TOKEN_TYPE = "http://schemas.xmlsoap.org/ws/2005/02/sc/dk";
39:
40: public static final String DEFAULT_DERIVED_KEY_TOKEN_ALGORITHM = "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1";
41:
42: public static final String DEFAULT_DERIVEDKEYTOKEN_LABEL = "WS-SecureConversationWS-SecureConversation";
43:
44: URI getAlgorithm();
45:
46: byte[] getNonce();
47:
48: long getLength();
49:
50: long getOffset();
51:
52: long getGeneration();
53:
54: String getLabel();
55:
56: SecretKey generateSymmetricKey(String algorithm)
57: throws InvalidKeyException, NoSuchAlgorithmException,
58: UnsupportedEncodingException;
59: }
|