Class XMLCipher.Factory.EncryptionMethodImpl
- java.lang.Object
-
- org.apache.xml.security.encryption.XMLCipher.Factory.EncryptionMethodImpl
-
- All Implemented Interfaces:
EncryptionMethod
- Enclosing class:
- XMLCipher.Factory
private class XMLCipher.Factory.EncryptionMethodImpl extends java.lang.Object implements EncryptionMethod
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
algorithm
private java.lang.String
digestAlgorithm
private java.util.List<org.w3c.dom.Element>
encryptionMethodInformation
private int
keySize
private java.lang.String
mgfAlgorithm
private byte[]
oaepParams
-
Constructor Summary
Constructors Constructor Description EncryptionMethodImpl(java.lang.String algorithm)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEncryptionMethodInformation(org.w3c.dom.Element info)
Adds encryption method information.java.lang.String
getAlgorithm()
Returns the algorithm applied to the cipher data.java.lang.String
getDigestAlgorithm()
Get the Digest Algorithm to usejava.util.Iterator<org.w3c.dom.Element>
getEncryptionMethodInformation()
Returns an iterator over all the additional elements contained in theEncryptionMethod
.int
getKeySize()
Returns the key size of the key of the algorithm applied to the cipher data.java.lang.String
getMGFAlgorithm()
Get the MGF Algorithm to usebyte[]
getOAEPparams()
Returns the OAEP parameters of the algorithm applied applied to the cipher data.void
removeEncryptionMethodInformation(org.w3c.dom.Element info)
Removes encryption method information.void
setDigestAlgorithm(java.lang.String digestAlgorithm)
Set the Digest Algorithm to usevoid
setKeySize(int size)
Sets the size of the key of the algorithm applied to the cipher data.void
setMGFAlgorithm(java.lang.String mgfAlgorithm)
Set the MGF Algorithm to usevoid
setOAEPparams(byte[] params)
Sets the OAEP parameters.(package private) org.w3c.dom.Element
toElement()
-
-
-
Field Detail
-
algorithm
private java.lang.String algorithm
-
keySize
private int keySize
-
oaepParams
private byte[] oaepParams
-
encryptionMethodInformation
private java.util.List<org.w3c.dom.Element> encryptionMethodInformation
-
digestAlgorithm
private java.lang.String digestAlgorithm
-
mgfAlgorithm
private java.lang.String mgfAlgorithm
-
-
Method Detail
-
getAlgorithm
public java.lang.String getAlgorithm()
Returns the algorithm applied to the cipher data.- Specified by:
getAlgorithm
in interfaceEncryptionMethod
- Returns:
- the encryption algorithm.
-
getKeySize
public int getKeySize()
Returns the key size of the key of the algorithm applied to the cipher data.- Specified by:
getKeySize
in interfaceEncryptionMethod
- Returns:
- the key size.
-
setKeySize
public void setKeySize(int size)
Sets the size of the key of the algorithm applied to the cipher data.- Specified by:
setKeySize
in interfaceEncryptionMethod
- Parameters:
size
- the key size.
-
getOAEPparams
public byte[] getOAEPparams()
Returns the OAEP parameters of the algorithm applied applied to the cipher data.- Specified by:
getOAEPparams
in interfaceEncryptionMethod
- Returns:
- the OAEP parameters.
-
setOAEPparams
public void setOAEPparams(byte[] params)
Sets the OAEP parameters.- Specified by:
setOAEPparams
in interfaceEncryptionMethod
- Parameters:
params
- the OAEP parameters.
-
setDigestAlgorithm
public void setDigestAlgorithm(java.lang.String digestAlgorithm)
Set the Digest Algorithm to use- Specified by:
setDigestAlgorithm
in interfaceEncryptionMethod
- Parameters:
digestAlgorithm
- the Digest Algorithm to use
-
getDigestAlgorithm
public java.lang.String getDigestAlgorithm()
Get the Digest Algorithm to use- Specified by:
getDigestAlgorithm
in interfaceEncryptionMethod
- Returns:
- the Digest Algorithm to use
-
setMGFAlgorithm
public void setMGFAlgorithm(java.lang.String mgfAlgorithm)
Set the MGF Algorithm to use- Specified by:
setMGFAlgorithm
in interfaceEncryptionMethod
- Parameters:
mgfAlgorithm
- the MGF Algorithm to use
-
getMGFAlgorithm
public java.lang.String getMGFAlgorithm()
Get the MGF Algorithm to use- Specified by:
getMGFAlgorithm
in interfaceEncryptionMethod
- Returns:
- the MGF Algorithm to use
-
getEncryptionMethodInformation
public java.util.Iterator<org.w3c.dom.Element> getEncryptionMethodInformation()
Returns an iterator over all the additional elements contained in theEncryptionMethod
.- Specified by:
getEncryptionMethodInformation
in interfaceEncryptionMethod
- Returns:
- an
Iterator
over all the additional information about theEncryptionMethod
.
-
addEncryptionMethodInformation
public void addEncryptionMethodInformation(org.w3c.dom.Element info)
Adds encryption method information.- Specified by:
addEncryptionMethodInformation
in interfaceEncryptionMethod
- Parameters:
info
- additional encryption method information.
-
removeEncryptionMethodInformation
public void removeEncryptionMethodInformation(org.w3c.dom.Element info)
Removes encryption method information.- Specified by:
removeEncryptionMethodInformation
in interfaceEncryptionMethod
- Parameters:
info
- the information to remove from theEncryptionMethod
.
-
toElement
org.w3c.dom.Element toElement()
-
-