- java.lang.Object
-
- org.apache.xml.security.encryption.XMLCipherInput
-
public class XMLCipherInput extends Object
XMLCipherInputis used to wrap input passed into the XMLCipher encryption operations. In decryption mode, it takes aCipherDataobject 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
-
-
Constructor Summary
Constructors Constructor Description XMLCipherInput(CipherData data)Constructor for processing encrypted octetsXMLCipherInput(EncryptedType input)Constructor for processing encrypted octets
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()Dereferences the input and returns it as a single byte array.voidsetSecureValidation(boolean secureValidation)Set whether secure validation is enabled or not.
-
-
-
Constructor Detail
-
XMLCipherInput
public XMLCipherInput(CipherData data) throws XMLEncryptionException
Constructor for processing encrypted octets- Parameters:
data- TheCipherDataobject to read the bytes from- Throws:
XMLEncryptionException-XMLEncryptionException
-
XMLCipherInput
public XMLCipherInput(EncryptedType input) throws XMLEncryptionException
Constructor for processing encrypted octets- Parameters:
input- TheEncryptedTypeobject to read the bytes from.- Throws:
XMLEncryptionException-XMLEncryptionException
-
-
Method Detail
-
setSecureValidation
public void setSecureValidation(boolean secureValidation)
Set whether secure validation is enabled or not. The default is false.
-
getBytes
public byte[] getBytes() throws XMLEncryptionExceptionDereferences the input and returns it as a single byte array.- Returns:
- The decripted bytes.
- Throws:
XMLEncryptionException
-
-