com.ibm.crypto.ibmjcehybrid.provider

Class RC4KeyGeneratorHybrid

  • java.lang.Object
    • javax.crypto.KeyGeneratorSpi
      • com.ibm.crypto.ibmjcehybrid.provider.RC4KeyGeneratorHybrid


  • public final class RC4KeyGeneratorHybrid
    extends javax.crypto.KeyGeneratorSpi
    This class is a facade for the RC4 key generation algorithm.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected javax.crypto.SecretKey engineGenerateKey()
      Gets the key generator and generates the key.
      protected void engineInit(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
      Initializes this key generator with the specified parameter set and a user-provided source of randomness.
      protected void engineInit(int keysize, java.security.SecureRandom random)
      Initializes this key generator for a certain keysize, using the given source of randomness.
      protected void engineInit(java.security.SecureRandom random)
      Initializes this key generator.
      protected javax.crypto.SecretKey generateKey(boolean isExternalCall)
      Gets the key generator and generates the key.
      javax.crypto.KeyGenerator getBestInstance(java.lang.String algorithm)
      Creates an instance of the specified KeyGenerator, the provider will be the selecting the first provider in the list for the generator that returns a KeyGenerator object.
      protected void getGenerator()
      Creates an instance of the KeyGenerator.
      • Methods inherited from class java.lang.Object

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

      • RC4KeyGeneratorHybrid

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

      • engineInit

        protected void engineInit(java.security.SecureRandom random)
        Initializes this key generator.
        Specified by:
        engineInit in class javax.crypto.KeyGeneratorSpi
        Parameters:
        random - the source of randomness for this generator
      • engineInit

        protected void engineInit(java.security.spec.AlgorithmParameterSpec params,
                                  java.security.SecureRandom random)
                           throws java.security.InvalidAlgorithmParameterException
        Initializes this key generator with the specified parameter set and a user-provided source of randomness.
        Specified by:
        engineInit in class javax.crypto.KeyGeneratorSpi
        Parameters:
        params - the key generation parameters
        random - the source of randomness for this key generator
        Throws:
        java.security.InvalidAlgorithmParameterException - if params is inappropriate for this key generator
      • engineInit

        protected void engineInit(int keysize,
                                  java.security.SecureRandom random)
        Initializes this key generator for a certain keysize, using the given source of randomness.
        Specified by:
        engineInit in class javax.crypto.KeyGeneratorSpi
        Parameters:
        keysize - the keysize. This is an algorithm-specific metric specified in number of bits.
        random - the source of randomness for this key generator
      • engineGenerateKey

        protected javax.crypto.SecretKey engineGenerateKey()
        Gets the key generator and generates the key.
        Specified by:
        engineGenerateKey in class javax.crypto.KeyGeneratorSpi
        Returns:
        the new key
      • generateKey

        protected javax.crypto.SecretKey generateKey(boolean isExternalCall)
        Gets the key generator and generates the key.
        Parameters:
        isExternalCall - should be true if this method is being called from engineGenerateKey(), otherwise it should be false.
        Returns:
        the new key
      • getGenerator

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

        public javax.crypto.KeyGenerator getBestInstance(java.lang.String algorithm)
        Creates an instance of the specified KeyGenerator, the provider will be the selecting the first provider in the list for the generator that returns a KeyGenerator object.
        Parameters:
        algorithm - The desired algorithm
        Returns:
        the requested KeyGenerator
        Throws:
        java.lang.RuntimeException - if this constructor fails to authenticate the JCE framework.
� Portions Copyright 1997, 2016 IBM Corporation. All rights reserved. � Portions Copyright 1997, 2016, Oracle and/or its affiliates. All rights reserved.