au.net.aba.crypto.provider
Class PBEWithMD5AndDES

java.lang.Object
  |
  +--javax.crypto.CipherSpi
        |
        +--au.net.aba.crypto.provider.PBE
              |
              +--au.net.aba.crypto.provider.PBEWithMD5AndDES

public class PBEWithMD5AndDES
extends PBE

This Cipher implements password based encryption (PBE) as specified in PKCS#5. This Cipher uses MD5 to convert the password into a DES Key and an initialisation vector. DES is then used in CBC mode (with PKCS#5 padding) to encrypt or decrypt the data.


Field Summary
static java.lang.String ident
           
 
Fields inherited from class au.net.aba.crypto.provider.PBE
cipher, ident
 
Fields inherited from class javax.crypto.CipherSpi
ident
 
Constructor Summary
PBEWithMD5AndDES()
           
 
Method Summary
protected  void initCipher(int opmode, byte[] salt, int iteration, char[] password)
          Initialises the cipher for encrypt or decryption using the provided algorithm parameters.
 
Methods inherited from class au.net.aba.crypto.provider.PBE
engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUpdate, engineUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ident

public static final java.lang.String ident
Constructor Detail

PBEWithMD5AndDES

public PBEWithMD5AndDES()
Method Detail

initCipher

protected void initCipher(int opmode,
                          byte[] salt,
                          int iteration,
                          char[] password)
Initialises the cipher for encrypt or decryption using the provided algorithm parameters.
Parameters:
opmode - Encrypt/Decrypt
salt - The salt to add to the password
iteration - The iteration count for key generation
password - The actual password to use in the key generation
Overrides:
initCipher in class PBE