de.flexiprovider.core.pbe.interfaces
Class PBES1

java.lang.Object
  |
  +--javax.crypto.CipherSpi
        |
        +--de.flexiprovider.api.Cipher
              |
              +--de.flexiprovider.core.pbe.interfaces.PBES1
Direct Known Subclasses:
PBES1

public abstract class PBES1
extends Cipher

Translation layer between PBEParameterSpec and PBEParameterSpec.

Author:
Martin Döring

Fields inherited from class de.flexiprovider.api.Cipher
DECRYPT_MODE, ENCRYPT_MODE, opMode
 
Constructor Summary
PBES1()
           
 
Method Summary
protected  void engineInit(int opMode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom javaRand)
          Translation method between PBEParameterSpec and PBEParameterSpec: initialize this cipher with a key, a set of algorithm parameters, and a source of randomness.
 
Methods inherited from class de.flexiprovider.api.Cipher
doFinal, doFinal, doFinal, doFinal, engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetKeySize, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineSetMode, engineSetPadding, engineUpdate, engineUpdate, getBlockSize, getIV, getKeySize, getName, getOutputSize, getParameters, initDecrypt, initEncrypt, setMode, setPadding, update, update, update
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBES1

public PBES1()
Method Detail

engineInit

protected final void engineInit(int opMode,
                                java.security.Key key,
                                java.security.spec.AlgorithmParameterSpec params,
                                java.security.SecureRandom javaRand)
                         throws java.security.InvalidKeyException,
                                java.security.InvalidAlgorithmParameterException
Translation method between PBEParameterSpec and PBEParameterSpec: initialize this cipher with a key, a set of algorithm parameters, and a source of randomness. The cipher is initialized for one of the following four operations: encryption, decryption, key wrapping or key unwrapping, depending on the value of opMode. If this cipher (including its underlying feedback or padding scheme) requires any random bytes (e.g., for parameter generation), it will get them from random. Note that when a Cipher object is initialized, it loses all previously-acquired state. In other words, initializing a Cipher is equivalent to creating a new instance of that Cipher and initializing it.
Overrides:
engineInit in class Cipher
Parameters:
opMode - the operation mode of this cipher (this is one of the following: ENCRYPT_MODE, DECRYPT_MODE)
key - the encryption key
params - the algorithm parameters
javaRand - the source of randomness
Throws:
java.security.InvalidKeyException - if the given key is inappropriate for initializing this cipher
java.security.InvalidAlgorithmParameterException - if the given algorithm parameters are inappropriate for this cipher, or if this cipher is being initialized for decryption and requires algorithm parameters and the parameters are null.