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.syncope.common.lib.types;
20  
21  public enum XmlSecAlgorithm {
22  
23      /**
24       * Triple DES EDE (192 bit key) in CBC mode
25       */
26      TRIPLEDES("http://www.w3.org/2001/04/xmlenc#tripledes-cbc"),
27  
28      /**
29       * AES 128 Cipher
30       */
31      AES_128("http://www.w3.org/2001/04/xmlenc#aes128-cbc"),
32  
33      /**
34       * AES 256 Cipher
35       */
36      AES_256("http://www.w3.org/2001/04/xmlenc#aes256-cbc"),
37  
38      /**
39       * AES 192 Cipher
40       */
41      AES_192("http://www.w3.org/2001/04/xmlenc#aes192-cbc"),
42  
43      /**
44       * AES 128 GCM Cipher
45       */
46      AES_128_GCM("http://www.w3.org/2009/xmlenc11#aes128-gcm"),
47  
48      /**
49       * AES 192 GCM Cipher
50       */
51      AES_192_GCM("http://www.w3.org/2009/xmlenc11#aes192-gcm"),
52  
53      /**
54       * AES 256 GCM Cipher
55       */
56      AES_256_GCM("http://www.w3.org/2009/xmlenc11#aes256-gcm"),
57  
58      /**
59       * SEED 128 Cipher
60       */
61      SEED_128("http://www.w3.org/2007/05/xmldsig-more#seed128-cbc"),
62  
63      /**
64       * CAMELLIA 128 Cipher
65       */
66      CAMELLIA_128("http://www.w3.org/2001/04/xmldsig-more#camellia128-cbc"),
67  
68      /**
69       * CAMELLIA 192 Cipher
70       */
71      CAMELLIA_192("http://www.w3.org/2001/04/xmldsig-more#camellia192-cbc"),
72  
73      /**
74       * CAMELLIA 256 Cipher
75       */
76      CAMELLIA_256("http://www.w3.org/2001/04/xmldsig-more#camellia256-cbc"),
77  
78      /**
79       * RSA 1.5 Cipher
80       */
81      RSA_v1dot5("http://www.w3.org/2001/04/xmlenc#rsa-1_5"),
82  
83      /**
84       * RSA OAEP Cipher
85       */
86      RSA_OAEP("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"),
87  
88      /**
89       * RSA OAEP Cipher
90       */
91      RSA_OAEP_11("http://www.w3.org/2009/xmlenc11#rsa-oaep"),
92  
93      /**
94       * DIFFIE_HELLMAN Cipher
95       */
96      DIFFIE_HELLMAN("http://www.w3.org/2001/04/xmlenc#dh"),
97  
98      /**
99       * Triple DES EDE (192 bit key) in CBC mode KEYWRAP
100      */
101     TRIPLEDES_KeyWrap("http://www.w3.org/2001/04/xmlenc#kw-tripledes"),
102 
103     /**
104      * AES 128 Cipher KeyWrap
105      */
106     AES_128_KeyWrap("http://www.w3.org/2001/04/xmlenc#kw-aes128"),
107 
108     /**
109      * AES 256 Cipher KeyWrap
110      */
111     AES_256_KeyWrap("http://www.w3.org/2001/04/xmlenc#kw-aes256"),
112 
113     /**
114      * AES 192 Cipher KeyWrap
115      */
116     AES_192_KeyWrap("http://www.w3.org/2001/04/xmlenc#kw-aes192"),
117 
118     /**
119      * CAMELLIA 128 Cipher KeyWrap
120      */
121     CAMELLIA_128_KeyWrap("http://www.w3.org/2001/04/xmldsig-more#kw-camellia128"),
122 
123     /**
124      * CAMELLIA 192 Cipher KeyWrap
125      */
126     CAMELLIA_192_KeyWrap("http://www.w3.org/2001/04/xmldsig-more#kw-camellia192"),
127 
128     /**
129      * CAMELLIA 256 Cipher KeyWrap
130      */
131     CAMELLIA_256_KeyWrap("http://www.w3.org/2001/04/xmldsig-more#kw-camellia256"),
132 
133     /**
134      * SEED 128 Cipher KeyWrap
135      */
136     SEED_128_KeyWrap("http://www.w3.org/2007/05/xmldsig-more#kw-seed128"),
137 
138     /**
139      * SHA1 Cipher
140      */
141     SHA1("http://www.w3.org/2000/09/xmldsig#sha1"),
142 
143     /**
144      * SHA256 Cipher
145      */
146     SHA256("http://www.w3.org/2001/04/xmlenc#sha256"),
147 
148     /**
149      * SHA512 Cipher
150      */
151     SHA512("http://www.w3.org/2001/04/xmlenc#sha512"),
152 
153     /**
154      * RIPEMD Cipher
155      */
156     RIPEMD_160("http://www.w3.org/2001/04/xmlenc#ripemd160");
157 
158     private final String algorithm;
159 
160     XmlSecAlgorithm(final String uri) {
161         this.algorithm = uri;
162     }
163 
164     public String getAlgorithm() {
165         return algorithm;
166     }
167 }