Class HSMPrivateKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Key, java.security.PrivateKey, javax.security.auth.Destroyable

    public class HSMPrivateKey
    extends java.lang.Object
    implements java.security.PrivateKey
    An implementation of the JCE PrivateKey interface to support HSM signing.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HSMPrivateKey​(com.rsa.jsafe.JSAFE_PrivateKey key, com.rsa.jsafe.JSAFE_Session[] session)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()  
      byte[] getEncoded()
      Returns null for the HSM private key .
      java.lang.String getFormat()  
      com.rsa.jsafe.JSAFE_PrivateKey getJsafeKey()
      Returns the com.rsa.jsafe.JSAFE_PrivateKey that holds private keys for all asymmetric operations
      com.rsa.jsafe.JSAFE_Session[] getSession()
      Returns an array of JSAFE Sessions that encapsulate the information needed to open a session with a token in a device that supports the Cryptoki (PKCS #11) interface.
      void setJsafeKey​(com.rsa.jsafe.JSAFE_PrivateKey jsafeKey)
      Supply the JSAFE_PrivateKey to be used for HSM signing.
      void setSession​(com.rsa.jsafe.JSAFE_Session[] session)
      Set the array of JSAFESessions that have been established with a token on the hardware device.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.security.auth.Destroyable

        destroy, isDestroyed
    • Constructor Detail

      • HSMPrivateKey

        public HSMPrivateKey​(com.rsa.jsafe.JSAFE_PrivateKey key,
                             com.rsa.jsafe.JSAFE_Session[] session)
    • Method Detail

      • getEncoded

        public byte[] getEncoded()
        Returns null for the HSM private key .
        Specified by:
        getEncoded in interface java.security.Key
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Specified by:
        getAlgorithm in interface java.security.Key
      • getFormat

        public java.lang.String getFormat()
        Specified by:
        getFormat in interface java.security.Key
      • getJsafeKey

        public com.rsa.jsafe.JSAFE_PrivateKey getJsafeKey()
        Returns the com.rsa.jsafe.JSAFE_PrivateKey that holds private keys for all asymmetric operations
        Returns:
        com.rsa.jsafe.JSAFE_PrivateKey
      • setJsafeKey

        public void setJsafeKey​(com.rsa.jsafe.JSAFE_PrivateKey jsafeKey)
        Supply the JSAFE_PrivateKey to be used for HSM signing.
        Parameters:
        jsafeKey -
      • getSession

        public com.rsa.jsafe.JSAFE_Session[] getSession()
        Returns an array of JSAFE Sessions that encapsulate the information needed to open a session with a token in a device that supports the Cryptoki (PKCS #11) interface.
        Returns:
        JSAFE_Session[] - array of Jsafe Sessionss that have been established with a token present in a hardware device
      • setSession

        public void setSession​(com.rsa.jsafe.JSAFE_Session[] session)
        Set the array of JSAFESessions that have been established with a token on the hardware device.
        Parameters:
        session -