Class XMLCipherInput
java.lang.Object
org.apache.xml.security.encryption.XMLCipherInput
XMLCipherInput
is used to wrap input passed into the
XMLCipher encryption operations.
In decryption mode, it takes a CipherData
object and allows
callers to dereference the CipherData into the encrypted bytes that it
actually represents. This takes care of all base64 encoding etc.
While primarily an internal class, this can be used by applications to
quickly and easily retrieve the encrypted bytes from an EncryptedType
object-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CipherData
The data we are working withprivate static final org.slf4j.Logger
private int
MODESprivate boolean
-
Constructor Summary
ConstructorsConstructorDescriptionXMLCipherInput
(CipherData data) Constructor for processing encrypted octetsXMLCipherInput
(EncryptedType input) Constructor for processing encrypted octets -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes()
Dereferences the input and returns it as a single byte array.private byte[]
Internal method to get bytes in decryption modevoid
setSecureValidation
(boolean secureValidation) Set whether secure validation is enabled or not.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
cipherData
The data we are working with -
mode
private int modeMODES -
secureValidation
private boolean secureValidation
-
-
Constructor Details
-
XMLCipherInput
Constructor for processing encrypted octets- Parameters:
data
- TheCipherData
object to read the bytes from- Throws:
XMLEncryptionException
-XMLEncryptionException
-
XMLCipherInput
Constructor for processing encrypted octets- Parameters:
input
- TheEncryptedType
object to read the bytes from.- Throws:
XMLEncryptionException
-XMLEncryptionException
-
-
Method Details
-
setSecureValidation
public void setSecureValidation(boolean secureValidation) Set whether secure validation is enabled or not. The default is false. -
getBytes
Dereferences the input and returns it as a single byte array.- Returns:
- The decripted bytes.
- Throws:
XMLEncryptionException
-
getDecryptBytes
Internal method to get bytes in decryption mode- Returns:
- the decrypted bytes
- Throws:
XMLEncryptionException
-