| java.lang.Object com.sun.midp.crypto.Cipher com.sun.midp.crypto.BlockCipherBase com.sun.midp.crypto.DES_ECB
All known Subclasses: com.sun.midp.crypto.DES_CBC,
Field Summary | |
final protected static int | BLOCK_SIZE DES ciphers encrypt/decrypt in block size of 8 bytes. | protected String | keyAlgorithm Algorithm of the key. |
Constructor Summary | |
public | DES_ECB(boolean useTripleDes) Constructor. |
Method Summary | |
public void | init(int mode, Key key, CryptoParameter params) Initializes this cipher with a key and a set of algorithm
parameters. | protected void | initKey(byte[] data, int mode) Initializes key. | protected void | processBlock(byte[] out, int offset) Depending on the mode, either encrypts
or decrypts the data in the queue. | protected void | setChainingModeAndPadding(String mode, String padding) Called by the factory method to set the mode and padding parameters. |
BLOCK_SIZE | final protected static int BLOCK_SIZE(Code) | | DES ciphers encrypt/decrypt in block size of 8 bytes.
|
keyAlgorithm | protected String keyAlgorithm(Code) | | Algorithm of the key.
|
DES_ECB | public DES_ECB(boolean useTripleDes)(Code) | | Constructor.
Parameters: useTripleDes - true if the class is being used for triple DES |
initKey | protected void initKey(byte[] data, int mode) throws InvalidKeyException(Code) | | Initializes key.
Parameters: data - key data Parameters: mode - cipher mode exception: InvalidKeyException - if the given key is inappropriatefor this cipher |
processBlock | protected void processBlock(byte[] out, int offset)(Code) | | Depending on the mode, either encrypts
or decrypts the data in the queue.
Parameters: out - will contain the result of encryptionor decryption operation Parameters: offset - is the offset in out |
setChainingModeAndPadding | protected void setChainingModeAndPadding(String mode, String padding) throws NoSuchPaddingException(Code) | | Called by the factory method to set the mode and padding parameters.
Need because Class.newInstance does not take args.
Parameters: mode - the mode parsed from the transformation parameter ofgetInstance and upper cased Parameters: padding - the paddinge parsed from the transformation parameter ofgetInstance and upper cased |
Methods inherited from com.sun.midp.crypto.BlockCipherBase | public int doFinal(byte in, int offset, int len, byte out, int outOffset) throws IllegalStateException, IllegalBlockSizeException, ShortBufferException, BadPaddingException(Code)(Java Doc) protected void doInit(int mode, String keyAlgorithm, Key key, boolean needIV, CryptoParameter params) throws InvalidKeyException, InvalidAlgorithmParameterException(Code)(Java Doc) public byte[] getIV()(Code)(Java Doc) abstract void initKey(byte[] data, int mode) throws InvalidKeyException(Code)(Java Doc) abstract void processBlock(byte[] out, int offset)(Code)(Java Doc) protected void restoreState()(Code)(Java Doc) protected void saveState()(Code)(Java Doc) protected void setPadding(String padding) throws NoSuchPaddingException(Code)(Java Doc) public int update(byte in, int offset, int len, byte out, int outOffset) throws IllegalStateException, ShortBufferException(Code)(Java Doc)
|
Methods inherited from com.sun.midp.crypto.Cipher | abstract public int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws IllegalStateException, ShortBufferException, IllegalBlockSizeException, BadPaddingException(Code)(Java Doc) public byte[] getIV()(Code)(Java Doc) final public static Cipher getInstance(String transformation) throws NoSuchAlgorithmException, NoSuchPaddingException(Code)(Java Doc) public void init(int opmode, Key key) throws InvalidKeyException(Code)(Java Doc) abstract public void init(int opmode, Key key, CryptoParameter params) throws InvalidKeyException, InvalidAlgorithmParameterException(Code)(Java Doc) abstract protected void setChainingModeAndPadding(String mode, String padding) throws NoSuchPaddingException(Code)(Java Doc) abstract public int update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws IllegalStateException, ShortBufferException(Code)(Java Doc)
|
|
|