author | malenkov |
Tue, 29 Oct 2013 17:01:06 +0400 | |
changeset 21278 | ef8a3a2a72f2 |
parent 18780 | f47b920867e7 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
18780
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
5 |
/** |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
6 |
* Licensed to the Apache Software Foundation (ASF) under one |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
7 |
* or more contributor license agreements. See the NOTICE file |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
8 |
* distributed with this work for additional information |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
9 |
* regarding copyright ownership. The ASF licenses this file |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
10 |
* to you under the Apache License, Version 2.0 (the |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
11 |
* "License"); you may not use this file except in compliance |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
12 |
* with the License. You may obtain a copy of the License at |
2 | 13 |
* |
18780
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
14 |
* http://www.apache.org/licenses/LICENSE-2.0 |
2 | 15 |
* |
18780
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
16 |
* Unless required by applicable law or agreed to in writing, |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
17 |
* software distributed under the License is distributed on an |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
18 |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
19 |
* KIND, either express or implied. See the License for the |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
20 |
* specific language governing permissions and limitations |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
21 |
* under the License. |
2 | 22 |
*/ |
23 |
package com.sun.org.apache.xml.internal.security.encryption; |
|
24 |
||
25 |
import java.util.Iterator; |
|
26 |
import org.w3c.dom.Element; |
|
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 |
/** |
|
18780
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
86 |
* Set the Digest Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
87 |
* @param digestAlgorithm the Digest Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
88 |
*/ |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
89 |
void setDigestAlgorithm(String digestAlgorithm); |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
90 |
|
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
91 |
/** |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
92 |
* Get the Digest Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
93 |
* @return the Digest Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
94 |
*/ |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
95 |
String getDigestAlgorithm(); |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
96 |
|
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
97 |
/** |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
98 |
* Set the MGF Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
99 |
* @param mgfAlgorithm the MGF Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
100 |
*/ |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
101 |
void setMGFAlgorithm(String mgfAlgorithm); |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
102 |
|
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
103 |
/** |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
104 |
* Get the MGF Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
105 |
* @return the MGF Algorithm to use |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
106 |
*/ |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
107 |
String getMGFAlgorithm(); |
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
108 |
|
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
109 |
/** |
2 | 110 |
* Returns an iterator over all the additional elements contained in the |
111 |
* <code>EncryptionMethod</code>. |
|
112 |
* |
|
21278 | 113 |
* @return an <code>Iterator</code> over all the additional information |
2 | 114 |
* about the <code>EncryptionMethod</code>. |
115 |
*/ |
|
10694
cf59e2badd14
7088502: Security libraries don't build with javac -Werror
mullan
parents:
2
diff
changeset
|
116 |
Iterator<Element> getEncryptionMethodInformation(); |
2 | 117 |
|
118 |
/** |
|
119 |
* Adds encryption method information. |
|
120 |
* |
|
121 |
* @param information additional encryption method information. |
|
122 |
*/ |
|
123 |
void addEncryptionMethodInformation(Element information); |
|
124 |
||
125 |
/** |
|
126 |
* Removes encryption method information. |
|
127 |
* |
|
128 |
* @param information the information to remove from the |
|
129 |
* <code>EncryptionMethod</code>. |
|
130 |
*/ |
|
131 |
void removeEncryptionMethodInformation(Element information); |
|
132 |
} |
|
18780
f47b920867e7
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
mullan
parents:
10694
diff
changeset
|
133 |