Class RSAPSSKeyPairGeneratorHybrid


  • public final class RSAPSSKeyPairGeneratorHybrid
    extends java.security.KeyPairGenerator
    This class is a facade for the RSASSA-PSS public/private key pair generation algorithm.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static com.ibm.misc.Debug debug
      The debug object, null if not instantiated at JVM startup.
    • Constructor Summary

      Constructors 
      Constructor Description
      RSAPSSKeyPairGeneratorHybrid()
      Creates an instance of the RSAPSSKeyPairGeneratorHybrid class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.KeyPair generateKeyPair()
      Generates an RSA key pair.
      protected void getGenerator()
      Creates an instance of the KeyPairGenerator.
      void initialize​(int strength, java.security.SecureRandom random)
      Initializes this KeyPairGenerator for given modulus size and secure random source.
      void initialize​(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
      Initializes this KeyPairGenerator for given parameters and secure random source.
      • Methods inherited from class java.security.KeyPairGenerator

        genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider, initialize, initialize
      • Methods inherited from class java.lang.Object

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

      • debug

        protected static com.ibm.misc.Debug debug
        The debug object, null if not instantiated at JVM startup.
    • Constructor Detail

      • RSAPSSKeyPairGeneratorHybrid

        public RSAPSSKeyPairGeneratorHybrid()
        Creates an instance of the RSAPSSKeyPairGeneratorHybrid class.
    • Method Detail

      • initialize

        public void initialize​(java.security.spec.AlgorithmParameterSpec params,
                               java.security.SecureRandom random)
                        throws java.security.InvalidAlgorithmParameterException,
                               java.security.InvalidParameterException
        Initializes this KeyPairGenerator for given parameters and secure random source.
        Overrides:
        initialize in class java.security.KeyPairGenerator
        Parameters:
        params - the RSAKeyParameterSpec for this object.
        random - the SecureRandom object for generating random numbers.
        Throws:
        java.security.InvalidAlgorithmParameterException - thrown when parameter set is not recognized.
        java.security.InvalidParameterException
      • initialize

        public void initialize​(int strength,
                               java.security.SecureRandom random)
                        throws java.security.InvalidParameterException
        Initializes this KeyPairGenerator for given modulus size and secure random source. The private key will be stored in the CLEAR not the hardware or the PKDS, the private key label will be randomly generated and the key will be used for signing purposes.
        Overrides:
        initialize in class java.security.KeyPairGenerator
        Parameters:
        strength - the length of the key to be generated.
        random - the SecureRandom object for generating a random number.
        Throws:
        java.security.InvalidParameterException - thrown when a parameter is not recognized.
      • generateKeyPair

        public java.security.KeyPair generateKeyPair()
        Generates an RSA key pair.
        Overrides:
        generateKeyPair in class java.security.KeyPairGenerator
        Returns:
        a KeyPair contains a pair of generated RSA keys
        Throws:
        java.lang.IllegalArgumentException - in the key label formal is not valid
      • getGenerator

        protected void getGenerator()
        Creates an instance of the KeyPairGenerator.
        Throws:
        java.lang.RuntimeException - if this method fails to create and to initialize the message digest.