FileDocCategorySizeDatePackage
DESEDE.javaAPI DocphoneME MR2 API (J2ME)2108Wed May 02 18:00:00 BST 2007com.sun.midp.crypto

DESEDE

public class DESEDE extends DES
DES EDE (Triple DES)cipher implementation.

Fields Summary
Constructors Summary
Methods Summary
protected voidsetChainingModeAndPadding(java.lang.String mode, java.lang.String padding)
Called by the factory method to set the mode and padding parameters. Need because Class.newInstance does not take args.

param
mode the mode parsed from the transformation parameter of getInstance
param
padding the paddinge parsed from the transformation parameter of getInstance
exception
NoSuchPaddingException if transformation contains a padding scheme that is not available.

        if (mode.equals("ECB") || mode.equals("")) {
            cipher = new DES_ECB(true);
        } else if (mode.equals("CBC")) {
            cipher = new DES_CBC(true);
        } else {
            throw new IllegalArgumentException();
        }

        cipher.setChainingModeAndPadding(mode, padding);