| java.lang.Object com.sun.midp.crypto.Cipher com.sun.midp.crypto.BlockCipherBase com.sun.midp.crypto.AES_ECB com.sun.midp.crypto.AES_CBC
AES_CBC | public class AES_CBC extends AES_ECB (Code) | | AES CBC Cipher.
|
Constructor Summary | |
public | AES_CBC() Constructor. |
Method Summary | |
public int | doFinal(byte inBuff, int inOffset, int inLength, byte outBuff, int outOffset) Encrypts or decrypts data in a single-part operation, or finishes a
multiple-part operation. | public void | init(int mode, Key key, CryptoParameter params) Initializes this cipher with a key and a set of algorithm
parameters. | protected void | processBlock(byte[] out, int offset) Depending on the mode, either encrypts or decrypts one block. | protected void | restoreState() Restores internal state. | protected void | saveState() Saves internal state. |
AES_CBC | public AES_CBC()(Code) | | Constructor.
|
doFinal | public int doFinal(byte inBuff, int inOffset, int inLength, byte outBuff, int outOffset) throws IllegalStateException, IllegalBlockSizeException, ShortBufferException, BadPaddingException(Code) | | Encrypts or decrypts data in a single-part operation, or finishes a
multiple-part operation. The data is encrypted or decrypted,
depending on how this cipher was initialized.
Parameters: inBuff - the input buffer Parameters: inOffset - the offset in input where the inputstarts Parameters: inLength - the input length Parameters: outBuff - the buffer for the result Parameters: outOffset - the offset in output where the resultis stored the number of bytes stored in output exception: IllegalStateException - if this cipher is in a wrong state(e.g., has not been initialized) exception: javax.crypto.IllegalBlockSizeException - if this cipher is ablock cipher,no padding has been requested (only in encryption mode), and the totalinput length of the data processed by this cipher is not a multiple ofblock size exception: javax.crypto.ShortBufferException - if the given output bufferis too small to hold the result exception: javax.crypto.BadPaddingException - if this cipher is indecryption mode,and (un)padding has been requested, but the decrypted data is notbounded by the appropriate padding bytes |
processBlock | protected void processBlock(byte[] out, int offset)(Code) | | Depending on the mode, either encrypts or decrypts one block.
Parameters: out - will contain the result of encryptionor decryption operation Parameters: offset - is the offset in out |
restoreState | protected void restoreState()(Code) | | Restores internal state.
|
saveState | protected void saveState()(Code) | | Saves internal state.
|
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)
|
|
|