javax.xml.crypto.enc

Class ToBeEncryptedKey

  1. java.lang.Object
  2. extended byjavax.xml.crypto.enc.ToBeEncryptedKey
All implemented interfaces:
ToBeEncrypted

  1. public class ToBeEncryptedKey
  2. extends java.lang.Object
  3. implements ToBeEncrypted
A representation of a ToBeEncrypted type containing a Key.
See Also:
ToBeEncrypted

Constructor Summary

Constructor and Description
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

Modifier and Type Method and Description
  1. java.lang.String
getEncoding()
  1. java.security.Key
getKey()
Returns the to be encrypted key
  1. java.lang.String
getMimeType()
  1. 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

  1. 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

  1. public ToBeEncryptedKey(java.security.Key key,
  2. java.lang.String type,
  3. java.lang.String mimeType,
  4. 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

  1. public java.security.Key getKey( )
Returns the to be encrypted key
Returns:
the key to be encrypted

getType

  1. 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

  1. public java.lang.String getMimeType( )
Specified by:
getMimeType in interface ToBeEncrypted
Returns:
the mime type, or null if not specified

getEncoding

  1. public java.lang.String getEncoding( )
Specified by:
getEncoding in interface ToBeEncrypted
Returns:
the encoding, or null if not specified