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
Class ToBeEncryptedKey

    java.lang.Object
      javax.xml.crypto.enc.ToBeEncryptedKey

All Implemented Interfaces:
  ToBeEncrypted

    public class ToBeEncryptedKey

extends java.lang.Object
implements ToBeEncrypted

A representation of a ToBeEncrypted type containing a Key.

See Also:
  `ToBeEncrypted`

Constructor Summary
`ToBeEncryptedKey(java.security.Key key)` Creates a new ToBeEncryptedKey
`ToBeEncryptedKey(java.security.Key key, java.lang.String type, java.lang.String mimeType, java.lang.String encoding)` Creates a new ToBeEncryptedKey

Method Summary
`java.lang.String` | `getEncoding()` `ToBeEncrypted.getEncoding`
`java.security.Key` | `getKey()` Returns the to be encrypted key
`java.lang.String` | `getMimeType()` `ToBeEncrypted.getMimeType`
`java.lang.String` | `getType()` Returns a URI identifying the type of the encrypted key.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ToBeEncryptedKey

    public ToBeEncryptedKey(java.security.Key key)

  Creates a new ToBeEncryptedKey

  Parameters:
    `key` - the key to be encrypted
  Throws:
    `java.lang.NullPointerException` - if `key` is null

### ToBeEncryptedKey

    public ToBeEncryptedKey(java.security.Key key,
                            java.lang.String type,
                            java.lang.String mimeType,
                            java.lang.String encoding)

  Creates a new ToBeEncryptedKey

  Parameters:
    `key` - the key to be encrypted
    `type` - the type (may be `null`)
    `mimeType` - the mime type (may be `null`)
    `encoding` - the encoding (may be `null`)
  Throws:
    `java.lang.NullPointerException` - if `key` is null

Method Detail

### getKey

    public java.security.Key getKey()

  Returns the to be encrypted key

  Returns:
    the key to be encrypted

### getType

    public java.lang.String getType()

  Returns a URI identifying the type of the encrypted key. See http://www.w3.org/TR/xmlenc-core for the list of supported key types

  Specified by:
    `getType` in interface `ToBeEncrypted`
  Returns:
    the type, or `null` if not specified

### getMimeType

    public java.lang.String getMimeType()

  `ToBeEncrypted.getMimeType`

  Specified by:
    `getMimeType` in interface `ToBeEncrypted`
  Returns:
    the mime type, or `null` if not specified

### getEncoding

    public java.lang.String getEncoding()

  `ToBeEncrypted.getEncoding`

  Specified by:
    `getEncoding` in interface `ToBeEncrypted`
  Returns:
    the encoding, or `null` if not specified

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