author | mullan |
Mon, 26 Sep 2011 17:20:45 -0700 | |
changeset 10694 | cf59e2badd14 |
parent 2 | 90ce3da70b43 |
child 18780 | f47b920867e7 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
5 |
/* |
|
6 |
* Copyright 2003-2004 The Apache Software Foundation. |
|
7 |
* |
|
8 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
9 |
* you may not use this file except in compliance with the License. |
|
10 |
* You may obtain a copy of the License at |
|
11 |
* |
|
12 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
13 |
* |
|
14 |
* Unless required by applicable law or agreed to in writing, software |
|
15 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
16 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
17 |
* See the License for the specific language governing permissions and |
|
18 |
* limitations under the License. |
|
19 |
* |
|
20 |
*/ |
|
21 |
package com.sun.org.apache.xml.internal.security.encryption; |
|
22 |
||
23 |
||
24 |
import java.util.Iterator; |
|
25 |
import org.w3c.dom.Element; |
|
26 |
||
27 |
||
28 |
/** |
|
29 |
* <code>EncryptionMethod</code> describes the encryption algorithm applied to |
|
30 |
* the cipher data. If the element is absent, the encryption algorithm must be |
|
31 |
* known by the recipient or the decryption will fail. |
|
32 |
* <p> |
|
33 |
* It is defined as follows: |
|
34 |
* <xmp> |
|
35 |
* <complexType name='EncryptionMethodType' mixed='true'> |
|
36 |
* <sequence> |
|
37 |
* <element name='KeySize' minOccurs='0' type='xenc:KeySizeType'/> |
|
38 |
* <element name='OAEPparams' minOccurs='0' type='base64Binary'/> |
|
39 |
* <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/> |
|
40 |
* </sequence> |
|
41 |
* <attribute name='Algorithm' type='anyURI' use='required'/> |
|
42 |
* </complexType> |
|
43 |
* </xmp> |
|
44 |
* |
|
45 |
* @author Axl Mattheus |
|
46 |
*/ |
|
47 |
public interface EncryptionMethod { |
|
48 |
/** |
|
49 |
* Returns the algorithm applied to the cipher data. |
|
50 |
* |
|
51 |
* @return the encryption algorithm. |
|
52 |
*/ |
|
53 |
String getAlgorithm(); |
|
54 |
||
55 |
/** |
|
56 |
* Returns the key size of the key of the algorithm applied to the cipher |
|
57 |
* data. |
|
58 |
* |
|
59 |
* @return the key size. |
|
60 |
*/ |
|
61 |
int getKeySize(); |
|
62 |
||
63 |
/** |
|
64 |
* Sets the size of the key of the algorithm applied to the cipher data. |
|
65 |
* |
|
66 |
* @param size the key size. |
|
67 |
*/ |
|
68 |
void setKeySize(int size); |
|
69 |
||
70 |
/** |
|
71 |
* Returns the OAEP parameters of the algorithm applied applied to the |
|
72 |
* cipher data. |
|
73 |
* |
|
74 |
* @return the OAEP parameters. |
|
75 |
*/ |
|
76 |
byte[] getOAEPparams(); |
|
77 |
||
78 |
/** |
|
79 |
* Sets the OAEP parameters. |
|
80 |
* |
|
81 |
* @param parameters the OAEP parameters. |
|
82 |
*/ |
|
83 |
void setOAEPparams(byte[] parameters); |
|
84 |
||
85 |
/** |
|
86 |
* Returns an iterator over all the additional elements contained in the |
|
87 |
* <code>EncryptionMethod</code>. |
|
88 |
* |
|
89 |
* @return an <code>Iterator</code> over all the additional infomation |
|
90 |
* about the <code>EncryptionMethod</code>. |
|
91 |
*/ |
|
10694
cf59e2badd14
7088502: Security libraries don't build with javac -Werror
mullan
parents:
2
diff
changeset
|
92 |
Iterator<Element> getEncryptionMethodInformation(); |
2 | 93 |
|
94 |
/** |
|
95 |
* Adds encryption method information. |
|
96 |
* |
|
97 |
* @param information additional encryption method information. |
|
98 |
*/ |
|
99 |
void addEncryptionMethodInformation(Element information); |
|
100 |
||
101 |
/** |
|
102 |
* Removes encryption method information. |
|
103 |
* |
|
104 |
* @param information the information to remove from the |
|
105 |
* <code>EncryptionMethod</code>. |
|
106 |
*/ |
|
107 |
void removeEncryptionMethodInformation(Element information); |
|
108 |
} |