001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036:
037: /*
038: * AlgorithmSuiteValue.java
039: *
040: * Created on February 14, 2006, 2:21 PM
041: *
042: * To change this template, choose Tools | Template Manager
043: * and open the template in the editor.
044: */
045:
046: package com.sun.xml.ws.security.policy;
047:
048: /**
049: * AlgorithmSuiteValue identifies the algorithm to be used to protect the message.
050: * @author Abhijit Das
051: */
052: public enum AlgorithmSuiteValue {
053: Basic256(Constants.SHA1, Constants.AES256, Constants.KW_AES256,
054: Constants.KW_RSA_OAEP, Constants.PSHA1_L256,
055: Constants.PSHA1_L192, 256), Basic192(Constants.SHA1,
056: Constants.AES192, Constants.KW_AES192,
057: Constants.KW_RSA_OAEP, Constants.PSHA1_L192,
058: Constants.PSHA1_L192, 192), Basic128(Constants.SHA1,
059: Constants.AES128, Constants.KW_AES128,
060: Constants.KW_RSA_OAEP, Constants.PSHA1_L128,
061: Constants.PSHA1_L128, 128), TripleDes(Constants.SHA1,
062: Constants.TRIPLE_DES, Constants.KW_TRIPLE_DES,
063: Constants.KW_RSA_OAEP, Constants.PSHA1_L192,
064: Constants.PSHA1_L192, 192), Basic256Rsa15(Constants.SHA1,
065: Constants.AES256, Constants.KW_AES256, Constants.KW_RSA15,
066: Constants.PSHA1_L256, Constants.PSHA1_L192, 256), Basic192Rsa15(
067: Constants.SHA1, Constants.AES192, Constants.KW_AES192,
068: Constants.KW_RSA15, Constants.PSHA1_L192,
069: Constants.PSHA1_L192, 192), Basic128Rsa15(Constants.SHA1,
070: Constants.AES128, Constants.KW_AES128, Constants.KW_RSA15,
071: Constants.PSHA1_L128, Constants.PSHA1_L128, 128), TripleDesRsa15(
072: Constants.SHA1, Constants.TRIPLE_DES,
073: Constants.KW_TRIPLE_DES, Constants.KW_RSA15,
074: Constants.PSHA1_L192, Constants.PSHA1_L192, 192), Basic256Sha256(
075: Constants.SHA256, Constants.AES256, Constants.KW_AES256,
076: Constants.KW_RSA_OAEP, Constants.PSHA1_L256,
077: Constants.PSHA1_L192, 256), Basic192Sha256(
078: Constants.SHA256, Constants.AES192, Constants.KW_AES192,
079: Constants.KW_RSA_OAEP, Constants.PSHA1_L192,
080: Constants.PSHA1_L192, 192), Basic128Sha256(
081: Constants.SHA256, Constants.AES128, Constants.KW_AES128,
082: Constants.KW_RSA_OAEP, Constants.PSHA1_L128,
083: Constants.PSHA1_L128, 128), TripleDesSha256(
084: Constants.SHA256, Constants.TRIPLE_DES,
085: Constants.KW_TRIPLE_DES, Constants.KW_RSA_OAEP,
086: Constants.PSHA1_L192, Constants.PSHA1_L192, 192), Basic256Sha256Rsa15(
087: Constants.SHA256, Constants.AES256, Constants.KW_AES256,
088: Constants.KW_RSA15, Constants.PSHA1_L256,
089: Constants.PSHA1_L192, 256), Basic192Sha256Rsa15(
090: Constants.SHA256, Constants.AES192, Constants.KW_AES192,
091: Constants.KW_RSA15, Constants.PSHA1_L192,
092: Constants.PSHA1_L192, 192), Basic128Sha256Rsa15(
093: Constants.SHA256, Constants.AES128, Constants.KW_AES128,
094: Constants.KW_RSA15, Constants.PSHA1_L128,
095: Constants.PSHA1_L128, 128), TripleDesSha256Rsa15(
096: Constants.SHA256, Constants.TRIPLE_DES,
097: Constants.KW_TRIPLE_DES, Constants.KW_RSA15,
098: Constants.PSHA1_L192, Constants.PSHA1_L192, 192);
099:
100: private final String dsigAlgorithm;
101: private final String encAlgorithm;
102: private final String symKWAlgorithm;
103: private final String asymKWAlgorithm;
104: private final String encKDAlgorithm;
105: private final String sigKDAlgorithm;
106: private final int minSKLAlgorithm;
107:
108: AlgorithmSuiteValue(String dsigAlgorithm, String encAlgorithm,
109: String symKWAlgorithm, String asymKWAlgorithm,
110: String encKDAlgorithm, String sigKDAlgorithm,
111: int minSKLAlgorithm) {
112:
113: this .dsigAlgorithm = dsigAlgorithm;
114: this .encAlgorithm = encAlgorithm;
115: this .symKWAlgorithm = symKWAlgorithm;
116: this .asymKWAlgorithm = asymKWAlgorithm;
117: this .encKDAlgorithm = encKDAlgorithm;
118: this .sigKDAlgorithm = sigKDAlgorithm;
119: this .minSKLAlgorithm = minSKLAlgorithm;
120: }
121:
122: public String getDigAlgorithm() {
123: return dsigAlgorithm;
124: }
125:
126: public String getEncAlgorithm() {
127: return encAlgorithm;
128: }
129:
130: public String getSymKWAlgorithm() {
131: return symKWAlgorithm;
132: }
133:
134: public String getAsymKWAlgorithm() {
135: return asymKWAlgorithm;
136: }
137:
138: public String getEncKDAlgorithm() {
139: return encKDAlgorithm;
140: }
141:
142: public String getSigKDAlgorithm() {
143: return sigKDAlgorithm;
144: }
145:
146: public int getMinSKLAlgorithm() {
147: return minSKLAlgorithm;
148: }
149: }
|