javax.xml.crypto.enc.keyinfo
Interface EncryptedKey
All Superinterfaces:
- public interface EncryptedKey
- extends EncryptedType
EncryptedKey element.
Its schema definition is as follows:
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
TYPE
URI identifying the EncryptedKey KeyInfo type:
http://www.w3.org/2001/04/xmlenc#EncryptedKey.
|
| Fields inherited from interface javax.xml.crypto.enc.EncryptedType |
|---|
CONTENT, ELEMENT, XMLNS |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
decrypt(XMLDecryptContext context)
Decrypts the
CipherData in this EncryptedKey.
|
|
decryptKey(XMLDecryptContext context,AlgorithmMethod alg)
Decrypts the
CipherData in this EncryptedKey
and returns the decrypted key as a Key object.
|
|
getCarriedKeyName()
Returns the carried key name of this
EncryptedKey.
|
|
getRecipient()
Returns a hint as to which recipient this
EncryptedKey is
intended for.
|
|
getReferenceList()
Returns an unmodifiable list of
ReferenceTypes containing
pointers to data and keys encrypted using this key.
|
| Methods inherited from interface javax.xml.crypto.enc.EncryptedType |
|---|
encrypt, getCipherData, getCipherText, getEncoding, getEncryptionMethod, getEncryptionProperties, getId, getKeyInfo, getMimeType, getToBeEncrypted, getType |
| Methods inherited from interface javax.xml.crypto.XMLStructure |
|---|
isFeatureSupported |
Field Detail
TYPE
- static final java.lang.String TYPE
See Also:
Method Detail
getReferenceList
- java.util.List getReferenceList( )
Returns an unmodifiable list of
ReferenceTypes containing
pointers to data and keys encrypted using this key.
Returns:
an unmodifiable list of
ReferenceTypes (may be
empty but never null) getCarriedKeyName
- java.lang.String getCarriedKeyName( )
Returns the carried key name of this
EncryptedKey.
Returns:
the carried key name or
null if not specified getRecipient
- java.lang.String getRecipient()
Returns a hint as to which recipient this
EncryptedKey is
intended for.
Returns:
the recipient or
null if not specified decrypt
- java.io.InputStream decrypt(XMLDecryptContext context)
- throws XMLEncryptionException
Decrypts the
CipherData in this EncryptedKey.
Specified by:
decrypt in interface EncryptedType
Parameters:
context - the decryption context Returns:
the decrypted
CipherData as an InputStream. Throws:
java.lang.NullPointerException - if context is null XMLEncryptionException - if an error occurs while decrypting decryptKey
- java.security.Key decryptKey(XMLDecryptContext context,
- AlgorithmMethod alg)
- throws XMLEncryptionException
Decrypts the
CipherData in this EncryptedKey
and returns the decrypted key as a Key object.
Parameters:
context - the decryption context alg - the algorithm of the decrypted key Returns:
the decrypted
CipherData as a key Throws:
java.lang.NullPointerException - if context is null or
alg is null. XMLEncryptionException - if an error occurs while decrypting
RetrievalMethodclass to identify the referent's type.