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:
- Author:
- Axl Mattheus
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
REFERENCE_TYPE ASNstatic final int
VALUE_TYPE ASN -
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to an external location containing the encrypted octet sequence (byte
array).Returns the cipher value as a base64 encodedbyte
array.int
Returns the type of encrypted data contained in theCipherData
.void
setCipherReference
(CipherReference reference) Sets theCipherData
's reference.void
setCipherValue
(CipherValue value) Sets theCipherData
's value.
-
Field Details
-
VALUE_TYPE
static final int VALUE_TYPEVALUE_TYPE ASN- See Also:
-
REFERENCE_TYPE
static final int REFERENCE_TYPEREFERENCE_TYPE ASN- See Also:
-
-
Method Details
-
getDataType
int getDataType()Returns the type of encrypted data contained in theCipherData
.- Returns:
VALUE_TYPE
if the encrypted data is contained asCipherValue
orREFERENCE_TYPE
if the encrypted data is contained asCipherReference
.
-
getCipherValue
CipherValue getCipherValue()Returns the cipher value as a base64 encodedbyte
array.- Returns:
- the
CipherData
's value.
-
setCipherValue
Sets theCipherData
's value.- Parameters:
value
- the value of theCipherData
.- Throws:
XMLEncryptionException
-
getCipherReference
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
Sets theCipherData
's reference.- Parameters:
reference
- an external location containing the enctrypted octet sequence.- Throws:
XMLEncryptionException
-