Interface EncryptedType
-
- All Known Subinterfaces:
EncryptedData
,EncryptedKey
- All Known Implementing Classes:
XMLCipher.Factory.EncryptedDataImpl
,XMLCipher.Factory.EncryptedKeyImpl
public interface EncryptedType
EncryptedType is the abstract type from whichEncryptedData
andEncryptedKey
are derived. While these two latter element types are very similar with respect to their content models, a syntactical distinction is useful to processing.Its schema definition is as follows:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CipherData
getCipherData()
Returns theCipherReference
that contains theCipherValue
orCipherReference
with the encrypted data.java.lang.String
getEncoding()
Return anURI
representing the encoding of theEncryptedType
.EncryptionMethod
getEncryptionMethod()
Returns anEncryptionMethod
that describes the encryption algorithm applied to the cipher data.EncryptionProperties
getEncryptionProperties()
Returns additional information concerning the generation of theEncryptedType
.java.lang.String
getId()
Returns aString
providing for the standard method of assigning an id to the element within the document context.KeyInfo
getKeyInfo()
Returns theds:KeyInfo
, that carries information about the key used to encrypt the data.java.lang.String
getMimeType()
Returns aString
which describes the media type of the data which has been encrypted.java.lang.String
getType()
Returns anURI
identifying type information about the plaintext form of the encrypted content.void
setEncoding(java.lang.String encoding)
Sets theURI
representing the encoding of theEncryptedType
.void
setEncryptionMethod(EncryptionMethod method)
Sets theEncryptionMethod
used to encrypt the cipher data.void
setEncryptionProperties(EncryptionProperties properties)
Sets theEncryptionProperties
that supplies additional information about the generation of theEncryptedType
.void
setId(java.lang.String id)
Sets the id.void
setKeyInfo(KeyInfo info)
Sets the encryption key information.void
setMimeType(java.lang.String type)
Sets the mime type.void
setType(java.lang.String type)
Sets the type.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns aString
providing for the standard method of assigning an id to the element within the document context.- Returns:
- the id for the
EncryptedType
.
-
setId
void setId(java.lang.String id)
Sets the id.- Parameters:
id
-
-
getType
java.lang.String getType()
Returns anURI
identifying type information about the plaintext form of the encrypted content. While optional, this specification takes advantage of it for mandatory processing described in Processing Rules: Decryption (section 4.2). If theEncryptedData
element contains data of Type 'element' or element 'content', and replaces that data in an XML document context, it is strongly recommended the Type attribute be provided. Without this information, the decryptor will be unable to automatically restore the XML document to its original cleartext form.- Returns:
- the identifier for the type of information in plaintext form of encrypted content.
-
setType
void setType(java.lang.String type)
Sets the type.- Parameters:
type
- anURI
identifying type information about the plaintext form of the encrypted content.
-
getMimeType
java.lang.String getMimeType()
Returns aString
which describes the media type of the data which has been encrypted. The value of this attribute has values defined by [MIME]. For example, if the data that is encrypted is a base64 encoded PNG, the transfer Encoding may be specified as 'http://www.w3.org/2000/09/xmldsig#base64' and the MimeType as 'image/png'.
This attribute is purely advisory; no validation of the MimeType information is required and it does not indicate the encryption application must do any additional processing. Note, this information may not be necessary if it is already bound to the identifier in the Type attribute. For example, the Element and Content types defined in this specification are always UTF-8 encoded text.- Returns:
- the media type of the data which was encrypted.
-
setMimeType
void setMimeType(java.lang.String type)
Sets the mime type.- Parameters:
type
- aString
which describes the media type of the data which has been encrypted.
-
getEncoding
java.lang.String getEncoding()
Return anURI
representing the encoding of theEncryptedType
.- Returns:
- the encoding of this
EncryptedType
.
-
setEncoding
void setEncoding(java.lang.String encoding)
Sets theURI
representing the encoding of theEncryptedType
.- Parameters:
encoding
-
-
getEncryptionMethod
EncryptionMethod getEncryptionMethod()
Returns anEncryptionMethod
that describes the encryption algorithm applied to the cipher data. If the element is absent, the encryption algorithm must be known by the recipient or the decryption will fail.- Returns:
- the method used to encrypt the cipher data.
-
setEncryptionMethod
void setEncryptionMethod(EncryptionMethod method)
Sets theEncryptionMethod
used to encrypt the cipher data.- Parameters:
method
- theEncryptionMethod
.
-
getKeyInfo
KeyInfo getKeyInfo()
Returns theds:KeyInfo
, that carries information about the key used to encrypt the data. Subsequent sections of this specification define new elements that may appear as children ofds:KeyInfo
.- Returns:
- information about the key that encrypted the cipher data.
-
setKeyInfo
void setKeyInfo(KeyInfo info)
Sets the encryption key information.- Parameters:
info
- theds:KeyInfo
, that carries information about the key used to encrypt the data.
-
getCipherData
CipherData getCipherData()
Returns theCipherReference
that contains theCipherValue
orCipherReference
with the encrypted data.- Returns:
- the cipher data for the encrypted type.
-
getEncryptionProperties
EncryptionProperties getEncryptionProperties()
Returns additional information concerning the generation of theEncryptedType
.- Returns:
- information relating to the generation of the
EncryptedType
.
-
setEncryptionProperties
void setEncryptionProperties(EncryptionProperties properties)
Sets theEncryptionProperties
that supplies additional information about the generation of theEncryptedType
.- Parameters:
properties
-
-
-