Bouncy Castle Cryptography Library 1.77.0

org.bouncycastle.jcajce.provider.symmetric.util
Class BaseKeyGenerator

java.lang.Object
  |
  +--javax.crypto.KeyGeneratorSpi
        |
        +--org.bouncycastle.jcajce.provider.symmetric.util.BaseKeyGenerator
Direct Known Subclasses:
AES.KeyGen, AES.Poly1305KeyGen, ARC4.KeyGen, ARIA.KeyGen, ARIA.Poly1305KeyGen, Blowfish.KeyGen, Camellia.KeyGen, Camellia.Poly1305KeyGen, CAST5.KeyGen, CAST6.KeyGen, CAST6.Poly1305KeyGen, ChaCha.KeyGen, ChaCha.KeyGen7539, DES.KeyGenerator, DESede.KeyGenerator, DESede.KeyGenerator3, DSTU7564.KeyGenerator256, DSTU7564.KeyGenerator384, DSTU7564.KeyGenerator512, DSTU7624.KeyGen, GOST28147.KeyGen, GOST3411.KeyGenerator, GOST3411.KeyGenerator2012_256, GOST3411.KeyGenerator2012_512, GOST3412_2015.KeyGen, Grain128.KeyGen, Grainv1.KeyGen, HC128.KeyGen, HC256.KeyGen, IDEA.KeyGen, Keccak.KeyGenerator224, Keccak.KeyGenerator256, Keccak.KeyGenerator288, Keccak.KeyGenerator384, Keccak.KeyGenerator512, MD2.KeyGenerator, MD4.KeyGenerator, MD5.KeyGenerator, Noekeon.KeyGen, Noekeon.Poly1305KeyGen, Poly1305.KeyGen, RC2.KeyGenerator, RC5.KeyGen32, RC5.KeyGen64, RC6.KeyGen, RC6.Poly1305KeyGen, Rijndael.KeyGen, RIPEMD128.KeyGenerator, RIPEMD160.KeyGenerator, RIPEMD256.KeyGenerator, RIPEMD320.KeyGenerator, Salsa20.KeyGen, SEED.KeyGen, SEED.Poly1305KeyGen, Serpent.KeyGen, Serpent.Poly1305KeyGen, Serpent.TKeyGen, SHA1.KeyGenerator, SHA224.KeyGenerator, SHA256.KeyGenerator, SHA3.KeyGeneratorSHA3, SHA384.KeyGenerator, SHA512.KeyGenerator, SHA512.KeyGeneratorT224, SHA512.KeyGeneratorT256, Shacal2.KeyGen, SipHash.KeyGen, SipHash128.KeyGen, Skein.HMacKeyGenerator_1024_1024, Skein.HMacKeyGenerator_1024_384, Skein.HMacKeyGenerator_1024_512, Skein.HMacKeyGenerator_256_128, Skein.HMacKeyGenerator_256_160, Skein.HMacKeyGenerator_256_224, Skein.HMacKeyGenerator_256_256, Skein.HMacKeyGenerator_512_128, Skein.HMacKeyGenerator_512_160, Skein.HMacKeyGenerator_512_224, Skein.HMacKeyGenerator_512_256, Skein.HMacKeyGenerator_512_384, Skein.HMacKeyGenerator_512_512, Skein.SkeinMacKeyGenerator_1024_1024, Skein.SkeinMacKeyGenerator_1024_384, Skein.SkeinMacKeyGenerator_1024_512, Skein.SkeinMacKeyGenerator_256_128, Skein.SkeinMacKeyGenerator_256_160, Skein.SkeinMacKeyGenerator_256_224, Skein.SkeinMacKeyGenerator_256_256, Skein.SkeinMacKeyGenerator_512_128, Skein.SkeinMacKeyGenerator_512_160, Skein.SkeinMacKeyGenerator_512_224, Skein.SkeinMacKeyGenerator_512_256, Skein.SkeinMacKeyGenerator_512_384, Skein.SkeinMacKeyGenerator_512_512, Skipjack.KeyGen, SM3.KeyGenerator, SM4.KeyGen, SM4.Poly1305KeyGen, TEA.KeyGen, Threefish.KeyGen_1024, Threefish.KeyGen_256, Threefish.KeyGen_512, Tiger.KeyGenerator, Twofish.KeyGen, Twofish.Poly1305KeyGen, VMPC.KeyGen, VMPCKSA3.KeyGen, Whirlpool.KeyGenerator, XSalsa20.KeyGen, XTEA.KeyGen, Zuc.KeyGen128, Zuc.KeyGen256

public class BaseKeyGenerator
extends javax.crypto.KeyGeneratorSpi


Field Summary
protected  java.lang.String algName
           
protected  int defaultKeySize
           
protected  CipherKeyGenerator engine
           
protected  int keySize
           
protected  boolean uninitialised
           
 
Constructor Summary
protected BaseKeyGenerator(java.lang.String algName, int defaultKeySize, CipherKeyGenerator engine)
           
 
Method Summary
protected  javax.crypto.SecretKey engineGenerateKey()
           
protected  void engineInit(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
           
protected  void engineInit(int keySize, java.security.SecureRandom random)
           
protected  void engineInit(java.security.SecureRandom random)
           
 
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

BaseKeyGenerator

protected BaseKeyGenerator(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
Overrides:
engineInit in class javax.crypto.KeyGeneratorSpi

engineInit

protected void engineInit(java.security.SecureRandom random)
Overrides:
engineInit in class javax.crypto.KeyGeneratorSpi

engineInit

protected void engineInit(int keySize,
                          java.security.SecureRandom random)
Overrides:
engineInit in class javax.crypto.KeyGeneratorSpi

engineGenerateKey

protected javax.crypto.SecretKey engineGenerateKey()
Overrides:
engineGenerateKey in class javax.crypto.KeyGeneratorSpi

Bouncy Castle Cryptography Library 1.77.0