Google

Bouncy Castle Cryptography 1.11 API Specification: Class JCEKeyGenerator.DESede
Bouncy Castle Cryptography 1.11

org.bouncycastle.jce.provider
Class JCEKeyGenerator.DESede

java.lang.Object
  |
  +--javax.crypto.KeyGeneratorSpi
        |
        +--org.bouncycastle.jce.provider.JCEKeyGenerator
              |
              +--org.bouncycastle.jce.provider.JCEKeyGenerator.DESede
Enclosing class:
JCEKeyGenerator

public static class JCEKeyGenerator.DESede
extends JCEKeyGenerator

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). If you give it a size, you'll get just what you asked for.


Inner classes inherited from class org.bouncycastle.jce.provider.JCEKeyGenerator
JCEKeyGenerator.AES, JCEKeyGenerator.Blowfish, JCEKeyGenerator.CAST5, JCEKeyGenerator.CAST6, JCEKeyGenerator.DES, JCEKeyGenerator.DESede, JCEKeyGenerator.IDEA, JCEKeyGenerator.RC2, JCEKeyGenerator.RC4, JCEKeyGenerator.RC5, JCEKeyGenerator.RC564, JCEKeyGenerator.RC6, JCEKeyGenerator.Rijndael, JCEKeyGenerator.Serpent, JCEKeyGenerator.Skipjack, JCEKeyGenerator.Twofish
 
Fields inherited from class org.bouncycastle.jce.provider.JCEKeyGenerator
algName, defaultKeySize, engine, keySize, uninitialised
 
Constructor Summary
JCEKeyGenerator.DESede()
           
 
Method Summary
protected  SecretKey engineGenerateKey()
          Generates a secret key.
protected  void engineInit(int keySize, java.security.SecureRandom random)
          Initializes this key generator for a certain keysize, using the given source of randomness.
 
Methods inherited from class org.bouncycastle.jce.provider.JCEKeyGenerator
engineInit, engineInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCEKeyGenerator.DESede

public JCEKeyGenerator.DESede()
Method Detail

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 JCEKeyGenerator
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 JCEKeyGenerator
Following copied from class: javax.crypto.KeyGeneratorSpi
Returns:
the new key.

Bouncy Castle Cryptography 1.11