Class DSAPrivateHWKeySpec

  • All Implemented Interfaces:
    java.security.spec.KeySpec

    public class DSAPrivateHWKeySpec
    extends java.lang.Object
    implements java.security.spec.KeySpec
    This class specifies a DSA Hardware key spec to be used with DSAKeyFactory. This is used to make a representation of the key for import or export, but as private hardware keys are only valid on the machine they are generated on, they can not be exported to another machine or imported from another machine. This is due to the fact that hardware private keys are labels to the actual stored private key on that machine.
    • Constructor Summary

      Constructors 
      Constructor Description
      DSAPrivateHWKeySpec​(byte[] keyLabel, java.security.spec.DSAParameterSpec parms, byte type)
      Creates a new instance of this class specifying the key label, the DSA parameters and the storage type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DSAKeyHWAttributes getAttributes()
      Returns the hardware key attributes associated with the key .
      java.security.spec.DSAParameterSpec getDSAParamSpec()
      Returns the DSA parameters associated with this key.
      byte[] getLabel()
      Returns a clone of the key label.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DSAPrivateHWKeySpec

        public DSAPrivateHWKeySpec​(byte[] keyLabel,
                                   java.security.spec.DSAParameterSpec parms,
                                   byte type)
        Creates a new instance of this class specifying the key label, the DSA parameters and the storage type.
        Parameters:
        keyLabel - the label associated with the private key. The label must conform to the character restrictions imposed by the platform you are executing on. Please note that it is recommended to use the KeyLabelKeySpec class to create a key specification using a KeyHWAttributeValues.PKDS type of key.
        parms - the DSA parameters for this key.
        type - is the hardware key storage type the only valid value is KeyHWAttributeValues.PKDS.
    • Method Detail

      • getLabel

        public byte[] getLabel()
        Returns a clone of the key label.
        Returns:
        A clone of the key label.
      • getAttributes

        public DSAKeyHWAttributes getAttributes()
        Returns the hardware key attributes associated with the key .
        Returns:
        the hardware key attributes.
      • getDSAParamSpec

        public java.security.spec.DSAParameterSpec getDSAParamSpec()
        Returns the DSA parameters associated with this key.
        Returns:
        the a DSAParameterSpec associate with key.