de.flexiprovider.core.rc6
Class RC6KeyGenerator
java.lang.Object
|
+--javax.crypto.KeyGeneratorSpi
|
+--de.flexiprovider.api.keys.SecretKeyGenerator
|
+--de.flexiprovider.core.rc6.RC6KeyGenerator
- public class RC6KeyGenerator
- extends SecretKeyGenerator
This class generates new keys for the RC6 block cipher. Values for the key
size are 128, 192, and 256 bits, with the default being 128 bits.
- Author:
- Christoph Sesterhenn, Christoph Ender
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RC6KeyGenerator
public RC6KeyGenerator()
init
public void init(AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidAlgorithmParameterException
- Initialize the key generator with the given parameters (which have to be
an instance of
RC6KeyGenParameterSpec) and a source of
randomness. If the parameters are null, the
default parameters
are used.
- Overrides:
init in class SecretKeyGenerator
- Parameters:
params - the parametersrandom - the source of randomness- Throws:
InvalidAlgorithmParameterException - if the parameters are null or not an instance
of RC6KeyGenParameterSpec.
init
public void init(int keySize,
SecureRandom random)
- Initialize the key generator with the given key size and source of
randomness. If the key size is invalid, the
default key size is
chosen.
- Overrides:
init in class SecretKeyGenerator
- Parameters:
keySize - the key size (128, 192, or 256 bits)random - the source of randomness
init
public void init(SecureRandom random)
- Initialize the key generator with the default RC6 parameters and the
given source of randomness.
- Overrides:
init in class SecretKeyGenerator
- Parameters:
random - the source of randomness
generateKey
public SecretKey generateKey()
- Generate an RC6 key.
- Overrides:
generateKey in class SecretKeyGenerator
- Returns:
- the generated
RC6Key