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
-
-
Field Summary
Fields Modifier and Type Field and Description private java.lang.Stringencodingprivate java.security.Keykeyprivate java.lang.StringmimeTypeprivate java.lang.Stringtype
-
Constructor Summary
Constructors Constructor and Description ToBeEncryptedKey(java.security.Key key)Creates a new ToBeEncryptedKeyToBeEncryptedKey(java.security.Key key, java.lang.String type, java.lang.String mimeType, java.lang.String encoding)Creates a new ToBeEncryptedKey
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetEncoding()java.security.KeygetKey()Returns the to be encrypted keyjava.lang.StringgetMimeType()java.lang.StringgetType()Returns a URI identifying the type of the encrypted key.
-
-
-
Field Detail
-
type
private java.lang.String type
-
mimeType
private java.lang.String mimeType
-
encoding
private java.lang.String encoding
-
key
private java.security.Key key
-
-
Constructor Detail
-
ToBeEncryptedKey
public ToBeEncryptedKey(java.security.Key key)
Creates a new ToBeEncryptedKey- Parameters:
key- the key to be encrypted- Throws:
java.lang.NullPointerException- ifkeyis 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 encryptedtype- the type (may benull)mimeType- the mime type (may benull)encoding- the encoding (may benull)- Throws:
java.lang.NullPointerException- ifkeyis 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:
getTypein interfaceToBeEncrypted- Returns:
- the type, or
nullif not specified
-
getMimeType
public java.lang.String getMimeType()
- Specified by:
getMimeTypein interfaceToBeEncrypted- Returns:
- the mime type, or
nullif not specified
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncodingin interfaceToBeEncrypted- Returns:
- the encoding, or
nullif not specified
-
-