< prev index next >

src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java

Print this page




  26 package java.security;
  27 
  28 import java.security.spec.AlgorithmParameterSpec;
  29 
  30 /**
  31  * <p> This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
  32  * for the {@code KeyPairGenerator} class, which is used to generate
  33  * pairs of public and private keys.
  34  *
  35  * <p> All the abstract methods in this class must be implemented by each
  36  * cryptographic service provider who wishes to supply the implementation
  37  * of a key pair generator for a particular algorithm.
  38  *
  39  * <p> In case the client does not explicitly initialize the KeyPairGenerator
  40  * (via a call to an {@code initialize} method), each provider must
  41  * supply (and document) a default initialization.
  42  * For example, the <i>Sun</i> provider uses a default modulus size (keysize)
  43  * of 1024 bits.
  44  *
  45  * @author Benjamin Renaud

  46  *
  47  *
  48  * @see KeyPairGenerator
  49  * @see java.security.spec.AlgorithmParameterSpec
  50  */
  51 
  52 public abstract class KeyPairGeneratorSpi {
  53 
  54     /**
  55      * Initializes the key pair generator for a certain keysize, using
  56      * the default parameter set.
  57      *
  58      * @param keysize the keysize. This is an
  59      * algorithm-specific metric, such as modulus length, specified in
  60      * number of bits.
  61      *
  62      * @param random the source of randomness for this generator.
  63      *
  64      * @exception InvalidParameterException if the {@code keysize} is not
  65      * supported by this KeyPairGeneratorSpi object.




  26 package java.security;
  27 
  28 import java.security.spec.AlgorithmParameterSpec;
  29 
  30 /**
  31  * <p> This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
  32  * for the {@code KeyPairGenerator} class, which is used to generate
  33  * pairs of public and private keys.
  34  *
  35  * <p> All the abstract methods in this class must be implemented by each
  36  * cryptographic service provider who wishes to supply the implementation
  37  * of a key pair generator for a particular algorithm.
  38  *
  39  * <p> In case the client does not explicitly initialize the KeyPairGenerator
  40  * (via a call to an {@code initialize} method), each provider must
  41  * supply (and document) a default initialization.
  42  * For example, the <i>Sun</i> provider uses a default modulus size (keysize)
  43  * of 1024 bits.
  44  *
  45  * @author Benjamin Renaud
  46  * @since 1.2
  47  *
  48  *
  49  * @see KeyPairGenerator
  50  * @see java.security.spec.AlgorithmParameterSpec
  51  */
  52 
  53 public abstract class KeyPairGeneratorSpi {
  54 
  55     /**
  56      * Initializes the key pair generator for a certain keysize, using
  57      * the default parameter set.
  58      *
  59      * @param keysize the keysize. This is an
  60      * algorithm-specific metric, such as modulus length, specified in
  61      * number of bits.
  62      *
  63      * @param random the source of randomness for this generator.
  64      *
  65      * @exception InvalidParameterException if the {@code keysize} is not
  66      * supported by this KeyPairGeneratorSpi object.


< prev index next >