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.String encoding 
      private java.security.Key key 
      private java.lang.String mimeType 
      private java.lang.String type 
    • Constructor Summary

      Constructors 
      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
    • 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 - 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
XML Security (JSR 105/106), 1.8

Copyright © 2015 IBM Corporation. All Rights Reserved.