Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.jce.provider
Class JCEKeyGenerator

    java.lang.Object
      |
      +--javax.crypto.KeyGeneratorSpi
            |
            +--org.bouncycastle.jce.provider.JCEKeyGenerator

Direct Known Subclasses:
  JCEKeyGenerator.AES, JCEKeyGenerator.AES128, JCEKeyGenerator.AES192, JCEKeyGenerator.AES256, JCEKeyGenerator.Blowfish, JCEKeyGenerator.CAST5, JCEKeyGenerator.CAST6, JCEKeyGenerator.DES, JCEKeyGenerator.DESede, JCEKeyGenerator.DESede3, JCEKeyGenerator.GOST28147, JCEKeyGenerator.HMACSHA1, JCEKeyGenerator.HMACSHA224, JCEKeyGenerator.HMACSHA256, JCEKeyGenerator.HMACSHA384, JCEKeyGenerator.HMACSHA512, JCEKeyGenerator.HMACTIGER, JCEKeyGenerator.IDEA, JCEKeyGenerator.MD2HMAC, JCEKeyGenerator.MD4HMAC, JCEKeyGenerator.MD5HMAC, JCEKeyGenerator.RC2, JCEKeyGenerator.RC4, JCEKeyGenerator.RC5, JCEKeyGenerator.RC564, JCEKeyGenerator.RC6, JCEKeyGenerator.Rijndael, JCEKeyGenerator.RIPEMD128HMAC, JCEKeyGenerator.RIPEMD160HMAC, JCEKeyGenerator.Serpent, JCEKeyGenerator.Skipjack, JCEKeyGenerator.Twofish

public class JCEKeyGenerator
extends KeyGeneratorSpi

Inner Class Summary
`static class` | `JCEKeyGenerator.AES` AES
`static class` | `JCEKeyGenerator.AES128`
`static class` | `JCEKeyGenerator.AES192`
`static class` | `JCEKeyGenerator.AES256`
`static class` | `JCEKeyGenerator.Blowfish` Blowfish
`static class` | `JCEKeyGenerator.CAST5` CAST5
`static class` | `JCEKeyGenerator.CAST6` CAST6
`static class` | `JCEKeyGenerator.DES` DES
`static class` | `JCEKeyGenerator.DESede` DESede - the default for this is to generate a key in a-b-a format that's 24 bytes long but has 16 bytes of key material (the first 8 bytes is repeated as the last 8 bytes).
`static class` | `JCEKeyGenerator.DESede3` generate a desEDE key in the a-b-c format.
`static class` | `JCEKeyGenerator.GOST28147` GOST28147
`static class` | `JCEKeyGenerator.HMACSHA1` HMACSHA1
`static class` | `JCEKeyGenerator.HMACSHA224` HMACSHA224
`static class` | `JCEKeyGenerator.HMACSHA256` HMACSHA256
`static class` | `JCEKeyGenerator.HMACSHA384` HMACSHA384
`static class` | `JCEKeyGenerator.HMACSHA512` HMACSHA512
`static class` | `JCEKeyGenerator.HMACTIGER` HMACTIGER
`static class` | `JCEKeyGenerator.IDEA` IDEA
`static class` | `JCEKeyGenerator.MD2HMAC` MD2HMAC
`static class` | `JCEKeyGenerator.MD4HMAC` MD4HMAC
`static class` | `JCEKeyGenerator.MD5HMAC` MD5HMAC
`static class` | `JCEKeyGenerator.RC2` RC2
`static class` | `JCEKeyGenerator.RC4` RC4
`static class` | `JCEKeyGenerator.RC5` RC5
`static class` | `JCEKeyGenerator.RC564` RC5
`static class` | `JCEKeyGenerator.RC6` RC6
`static class` | `JCEKeyGenerator.Rijndael` Rijndael
`static class` | `JCEKeyGenerator.RIPEMD128HMAC` RIPE128HMAC
`static class` | `JCEKeyGenerator.RIPEMD160HMAC` RIPE160HMAC
`static class` | `JCEKeyGenerator.Serpent` Serpent
`static class` | `JCEKeyGenerator.Skipjack` SKIPJACK
`static class` | `JCEKeyGenerator.Twofish` Twofish

Field Summary
`protected java.lang.String` | `algName`
`protected int` | `defaultKeySize`
`protected CipherKeyGenerator` | `engine`
`protected int` | `keySize`
`protected boolean` | `uninitialised`

Constructor Summary
`protected` | `JCEKeyGenerator(java.lang.String algName, int defaultKeySize, CipherKeyGenerator engine)`

Method Summary
`protected SecretKey` | `engineGenerateKey()` Generates a secret key.
`protected void` | `engineInit(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)` Initializes the 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 the key generator.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### algName

    protected java.lang.String algName

### keySize

    protected int keySize

### defaultKeySize

    protected int defaultKeySize

### engine

    protected CipherKeyGenerator engine

### uninitialised

    protected boolean uninitialised

Constructor Detail

### JCEKeyGenerator

    protected JCEKeyGenerator(java.lang.String algName,
                              int defaultKeySize,
                              CipherKeyGenerator engine)

Method Detail

### engineInit

    protected void engineInit(java.security.spec.AlgorithmParameterSpec params,
                              java.security.SecureRandom random)
                       throws java.security.InvalidAlgorithmParameterException

  Description copied from class: `KeyGeneratorSpi`
  Initializes the key generator with the specified parameter set and a user-provided source of randomness.
  Overrides:
    `engineInit` in class `KeyGeneratorSpi`
  Following copied from 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(java.security.SecureRandom random)

  Description copied from class: `KeyGeneratorSpi`
  Initializes the key generator.
  Overrides:
    `engineInit` in class `KeyGeneratorSpi`
  Following copied from class: `javax.crypto.KeyGeneratorSpi`
  Parameters:
    `random` - the source of randomness for this generator

### engineInit

    protected void engineInit(int keySize,
                              java.security.SecureRandom random)

  Description copied from class: `KeyGeneratorSpi`
  Initializes this key generator for a certain keysize, using the given source of randomness.
  Overrides:
    `engineInit` in class `KeyGeneratorSpi`
  Following copied from 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.
  Throws:
    `java.security.InvalidParameterException` - if keysize is wrong or not supported.

### engineGenerateKey

    protected SecretKey engineGenerateKey()

  Description copied from class: `KeyGeneratorSpi`
  Generates a secret key.
  Overrides:
    `engineGenerateKey` in class `KeyGeneratorSpi`
  Following copied from class: `javax.crypto.KeyGeneratorSpi`
  Returns:
    the new key.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD