Interface CipherData
-
- All Known Implementing Classes:
XMLCipher.Factory.CipherDataImpl
public interface CipherData
CipherData
provides encrypted data. It must either contain the encrypted octet sequence as base64 encoded text of theCipherValue
element, or provide a reference to an external location containing the encrypted octet sequence via theCipherReference
element.The schema definition is as follows:
-
-
Field Summary
Fields Modifier and Type Field Description static int
REFERENCE_TYPE
REFERENCE_TYPE ASNstatic int
VALUE_TYPE
VALUE_TYPE ASN
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 encodedbyte
array.int
getDataType()
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 Detail
-
VALUE_TYPE
static final int VALUE_TYPE
VALUE_TYPE ASN- See Also:
- Constant Field Values
-
REFERENCE_TYPE
static final int REFERENCE_TYPE
REFERENCE_TYPE ASN- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void setCipherValue(CipherValue value) throws XMLEncryptionException
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 encrypted octet sequence.
-
setCipherReference
void setCipherReference(CipherReference reference) throws XMLEncryptionException
Sets theCipherData
's reference.- Parameters:
reference
- an external location containing the encrypted octet sequence.- Throws:
XMLEncryptionException
-
-