Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| XML Digital Signature and Encryption, 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.crypto.enc
Interface EncryptedData

All Superinterfaces:
  EncryptedType, XMLStructure

    public interface EncryptedData

extends EncryptedType

A representation of the XML `EncryptedData` element as defined in the W3C Recommendation for XML-Encryption Syntax and Processing. This is the core element in the XML Encryption. It provides method to encrypt and decrypt XML Encryption. The child of this element contains the encrypted data and this element can be used to replace the element being encrypted.

Field Summary

Fields inherited from interface javax.xml.crypto.enc.EncryptedType
`CONTENT, ELEMENT, XMLNS`

Method Summary
`java.io.InputStream` | `decrypt(XMLDecryptContext context)` Decrypts the `CipherData` in this `EncryptedData`.
`void` | `decryptAndReplace(XMLDecryptContext context)` Decrypts the `CipherData` in this `EncryptedData` and replace the EncryptedData with the decrypted data or element

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`

Method Detail

### decrypt

    java.io.InputStream decrypt(XMLDecryptContext context)
                                throws XMLEncryptionException

  Decrypts the `CipherData` in this `EncryptedData`.

  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

### decryptAndReplace

    void decryptAndReplace(XMLDecryptContext context)
                           throws XMLEncryptionException

  Decrypts the `CipherData` in this `EncryptedData` and replace the EncryptedData with the decrypted data or element

  Parameters:
    `context` - the decryption context
  Throws:
    `java.lang.NullPointerException` - if context is `null`
    `XMLEncryptionException` - if an error occurs while decrypting

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| XML Digital Signature and Encryption, 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2004, IBM Corporation and Sun Microsystems, Inc. All rights reserved.
Please send comments to: jsr-106-comments@jcp.org