org.apache.xml.security.encryption
Interface CipherData


public interface CipherData

CipherData provides encrypted data. It must either contain the encrypted octet sequence as base64 encoded text of the CipherValue element, or provide a reference to an external location containing the encrypted octet sequence via the CipherReference element.

The schema definition is as follows:

<element name='CipherData' type='xenc:CipherDataType'/> <complexType name='CipherDataType'> <choice> <element name='CipherValue' type='base64Binary'/> <element ref='xenc:CipherReference'/> </choice> </complexType>

Author:
Axl Mattheus

Field Summary
static int REFERENCE_TYPE
          REFERENCE_TYPE ASN
static int VALUE_TYPE
          VALUE_TYPE ASN
 
Method Summary
 CipherReference getCipherReference()
          Returns a reference to an external location containing the encrypted octet sequence (byte array).
 CipherValue getCipherValue()
          Returns the cipher value as a base64 encoded byte array.
 int getDataType()
          Returns the type of encrypted data contained in the CipherData.
 void setCipherReference(CipherReference reference)
          Sets the CipherData's reference.
 void setCipherValue(CipherValue value)
          Sets the CipherData's value.
 

Field Detail

VALUE_TYPE

public static final int VALUE_TYPE
VALUE_TYPE ASN

See Also:
Constant Field Values

REFERENCE_TYPE

public static final int REFERENCE_TYPE
REFERENCE_TYPE ASN

See Also:
Constant Field Values
Method Detail

getDataType

public int getDataType()
Returns the type of encrypted data contained in the CipherData.

Returns:
VALUE_TYPE if the encrypted data is contained as CipherValue or REFERENCE_TYPE if the encrypted data is contained as CipherReference.

getCipherValue

public CipherValue getCipherValue()
Returns the cipher value as a base64 encoded byte array.

Returns:
the CipherData's value.

setCipherValue

public void setCipherValue(CipherValue value)
                    throws XMLEncryptionException
Sets the CipherData's value.

Parameters:
value - the value of the CipherData.
Throws:
XMLEncryptionException

getCipherReference

public CipherReference getCipherReference()
Returns a reference to an external location containing the encrypted octet sequence (byte array).

Returns:
the reference to an external location containing the enctrypted octet sequence.

setCipherReference

public void setCipherReference(CipherReference reference)
                        throws XMLEncryptionException
Sets the CipherData's reference.

Parameters:
reference - an external location containing the enctrypted octet sequence.
Throws:
XMLEncryptionException