All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class is.logi.crypto.modes.DecryptECB

java.lang.Object
   |
   +----is.logi.crypto.Crypto
           |
           +----is.logi.crypto.modes.DecryptMode
                   |
                   +----is.logi.crypto.modes.DecryptECB

public class DecryptECB
extends DecryptMode
Use this class to decrypt ciphertext generated by EncryptECB.

If you are using symmetric keys, the DecryptECB object must be initialized with the same key as the EncryptECB object it is decrypting data from. If you are using asymetric keys, the DecryptECB object must be initialized with the other key from the key-pair.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
EncryptECB

Constructor Index

 o DecryptECB()
Create a new ECB-mode decrypt session with no key.
 o DecryptECB(CipherKey)
Create a new ECB-mode decrypt session with the specified key.

Method Index

 o decrypt(byte[], int, int)
Send bytes to the DecryptECB object for decryption.
 o getKey()
Return the key used for decryption.
 o setKey(CipherKey)
Set the key to use for decryption.

Constructors

 o DecryptECB
 public DecryptECB(CipherKey key)
Create a new ECB-mode decrypt session with the specified key.

 o DecryptECB
 public DecryptECB()
Create a new ECB-mode decrypt session with no key. No decryption can be performed until a call to setKey() has been made.

Methods

 o getKey
 public CipherKey getKey()
Return the key used for decryption.

Overrides:
getKey in class DecryptMode
 o setKey
 public void setKey(CipherKey key)
Set the key to use for decryption. Do not call this method when there may be data in the internal buffer.

Overrides:
setKey in class DecryptMode
 o decrypt
 public synchronized byte[] decrypt(byte source[],
                                    int i,
                                    int length)
Send bytes to the DecryptECB object for decryption.

Decrypt length bytes from source, starting at i and return the plaintext. Data may be encrypted in blocks in which case only whole blocks of plaintext are written to dest. Any remaining data will be stored and prepended to source in the next call to decrypt.

Overrides:
decrypt in class DecryptMode

All Packages  Class Hierarchy  This Package  Previous  Next  Index