Module org.apache.santuario.xmlsec
Interface EncryptionMethod
-
public interface EncryptionMethodEncryptionMethoddescribes the encryption algorithm applied to the cipher data. If the element is absent, the encryption algorithm must be known by the recipient or the decryption will fail.It is defined as follows:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEncryptionMethodInformation(Element information)Adds encryption method information.StringgetAlgorithm()Returns the algorithm applied to the cipher data.StringgetDigestAlgorithm()Get the Digest Algorithm to useIterator<Element>getEncryptionMethodInformation()Returns an iterator over all the additional elements contained in theEncryptionMethod.intgetKeySize()Returns the key size of the key of the algorithm applied to the cipher data.StringgetMGFAlgorithm()Get the MGF Algorithm to usebyte[]getOAEPparams()Returns the OAEP parameters of the algorithm applied applied to the cipher data.voidremoveEncryptionMethodInformation(Element information)Removes encryption method information.voidsetDigestAlgorithm(String digestAlgorithm)Set the Digest Algorithm to usevoidsetKeySize(int size)Sets the size of the key of the algorithm applied to the cipher data.voidsetMGFAlgorithm(String mgfAlgorithm)Set the MGF Algorithm to usevoidsetOAEPparams(byte[] parameters)Sets the OAEP parameters.
-
-
-
Method Detail
-
getAlgorithm
String getAlgorithm()
Returns the algorithm applied to the cipher data.- Returns:
- the encryption algorithm.
-
getKeySize
int getKeySize()
Returns the key size of the key of the algorithm applied to the cipher data.- Returns:
- the key size.
-
setKeySize
void setKeySize(int size)
Sets the size of the key of the algorithm applied to the cipher data.- Parameters:
size- the key size.
-
getOAEPparams
byte[] getOAEPparams()
Returns the OAEP parameters of the algorithm applied applied to the cipher data.- Returns:
- the OAEP parameters.
-
setOAEPparams
void setOAEPparams(byte[] parameters)
Sets the OAEP parameters.- Parameters:
parameters- the OAEP parameters.
-
setDigestAlgorithm
void setDigestAlgorithm(String digestAlgorithm)
Set the Digest Algorithm to use- Parameters:
digestAlgorithm- the Digest Algorithm to use
-
getDigestAlgorithm
String getDigestAlgorithm()
Get the Digest Algorithm to use- Returns:
- the Digest Algorithm to use
-
setMGFAlgorithm
void setMGFAlgorithm(String mgfAlgorithm)
Set the MGF Algorithm to use- Parameters:
mgfAlgorithm- the MGF Algorithm to use
-
getMGFAlgorithm
String getMGFAlgorithm()
Get the MGF Algorithm to use- Returns:
- the MGF Algorithm to use
-
getEncryptionMethodInformation
Iterator<Element> getEncryptionMethodInformation()
Returns an iterator over all the additional elements contained in theEncryptionMethod.- Returns:
- an
Iteratorover all the additional information about theEncryptionMethod.
-
addEncryptionMethodInformation
void addEncryptionMethodInformation(Element information)
Adds encryption method information.- Parameters:
information- additional encryption method information.
-
removeEncryptionMethodInformation
void removeEncryptionMethodInformation(Element information)
Removes encryption method information.- Parameters:
information- the information to remove from theEncryptionMethod.
-
-