View Javadoc
1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements. See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership. The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License. You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied. See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.wss4j.common;
20  
21  
22  import org.apache.xml.security.encryption.params.KeyDerivationParameters;
23  
24  /**
25   * This class encapsulates configuration for Encryption Actions.
26   */
27  public class EncryptionActionToken extends SignatureEncryptionActionToken {
28  
29      private boolean encSymmetricEncryptionKey = true;
30      private String mgfAlgorithm;
31      private String symmetricAlgorithm;
32      private String keyAgreementMethodAlgorithm;
33      private String keyDerivationFunction;
34      private KeyDerivationParameters keyDerivationParameters;
35      private String keyTransportAlgorithm;
36      private boolean getSymmetricKeyFromCallbackHandler;
37  
38      public boolean isEncSymmetricEncryptionKey() {
39          return encSymmetricEncryptionKey;
40      }
41      public void setEncSymmetricEncryptionKey(boolean encSymmetricEncryptionKey) {
42          this.encSymmetricEncryptionKey = encSymmetricEncryptionKey;
43      }
44      public String getMgfAlgorithm() {
45          return mgfAlgorithm;
46      }
47      public void setMgfAlgorithm(String mgfAlgorithm) {
48          this.mgfAlgorithm = mgfAlgorithm;
49      }
50      public String getSymmetricAlgorithm() {
51          return symmetricAlgorithm;
52      }
53      public void setSymmetricAlgorithm(String symmetricAlgorithm) {
54          this.symmetricAlgorithm = symmetricAlgorithm;
55      }
56      public String getKeyTransportAlgorithm() {
57          return keyTransportAlgorithm;
58      }
59      public void setKeyTransportAlgorithm(String keyTransportAlgorithm) {
60          this.keyTransportAlgorithm = keyTransportAlgorithm;
61      }
62  
63      public String getKeyAgreementMethodAlgorithm() {
64          return keyAgreementMethodAlgorithm;
65      }
66      public void setKeyAgreementMethodAlgorithm(String keyAgreementMethodAlgorithm) {
67          this.keyAgreementMethodAlgorithm = keyAgreementMethodAlgorithm;
68      }
69      public boolean isGetSymmetricKeyFromCallbackHandler() {
70          return getSymmetricKeyFromCallbackHandler;
71      }
72      public void setGetSymmetricKeyFromCallbackHandler(boolean getSymmetricKeyFromCallbackHandler) {
73          this.getSymmetricKeyFromCallbackHandler = getSymmetricKeyFromCallbackHandler;
74      }
75  
76      public String getKeyDerivationFunction() {
77          return keyDerivationFunction;
78      }
79  
80      public void setKeyDerivationFunction(String keyDerivationFunction) {
81          this.keyDerivationFunction = keyDerivationFunction;
82      }
83  
84      public KeyDerivationParameters getKeyDerivationParameters() {
85          return keyDerivationParameters;
86      }
87  
88      public void setKeyDerivationParameters(KeyDerivationParameters keyDerivationParameters) {
89          this.keyDerivationParameters = keyDerivationParameters;
90      }
91  }
92