Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.crypto
Class KeyGeneratorSpi  view KeyGeneratorSpi download KeyGeneratorSpi.java

java.lang.Object
  extended byjavax.crypto.KeyGeneratorSpi

public abstract class KeyGeneratorSpi
extends java.lang.Object

The Service Provider Interface (SPI) for the KeyGenerator class.

Providers wishing to implement a key generator must subclass this and provide an appropriate implementation for all the abstract methods below, and provide an appropriate entry in the master java.security.Provider class (the service name for key generators is "KeyGenerator").

Since:
1.4

Constructor Summary
KeyGeneratorSpi()
          Create a new key generator SPI.
 
Method Summary
protected abstract  SecretKey engineGenerateKey()
          Generate a key, returning it as a SecretKey.
protected abstract  void engineInit(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
          Initialize this key generator with parameters and a source of randomness.
protected abstract  void engineInit(int keySize, java.security.SecureRandom random)
          Initialize this key generator with a key size (in bits) and a source of randomness.
protected abstract  void engineInit(java.security.SecureRandom random)
          Initialize this key generator with a source of randomness; the implementation should use reasonable default parameters (such as generated key size).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyGeneratorSpi

public KeyGeneratorSpi()
Create a new key generator SPI.

Method Detail

engineGenerateKey

protected abstract SecretKey engineGenerateKey()
Generate a key, returning it as a SecretKey.


engineInit

protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec params,
                                   java.security.SecureRandom random)
                            throws java.security.InvalidAlgorithmParameterException
Initialize this key generator with parameters and a source of randomness.


engineInit

protected abstract void engineInit(int keySize,
                                   java.security.SecureRandom random)
Initialize this key generator with a key size (in bits) and a source of randomness.


engineInit

protected abstract void engineInit(java.security.SecureRandom random)
Initialize this key generator with a source of randomness; the implementation should use reasonable default parameters (such as generated key size).