|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logi.crypto.Crypto
org.logi.crypto.modes.DecryptMode
org.logi.crypto.modes.DecryptECB
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.
EncryptECB
Field Summary |
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
DecryptECB()
Create a new ECB-mode decrypt session with no key. |
|
DecryptECB(CipherKey key)
Create a new ECB-mode decrypt session with the specified key. |
Method Summary | |
byte[] |
decrypt(byte[] source,
int i,
int length)
Send bytes to the DecryptECB object for decryption. |
CipherKey |
getKey()
Return the key used for decryption. |
int |
plainBlockSize()
Return the size of the blocks of plaintext output by this object. |
void |
setKey(CipherKey key)
Set the key to use for decryption. |
Methods inherited from class org.logi.crypto.modes.DecryptMode |
close, finalize |
Methods inherited from class org.logi.crypto.Crypto |
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readBlock, readInt, writeBytes, writeBytes, writeInt |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DecryptECB(CipherKey key)
public DecryptECB()
setKey()
has been
made.
Method Detail |
public CipherKey getKey()
getKey
in class DecryptMode
public void setKey(CipherKey key)
setKey
in class DecryptMode
public int plainBlockSize()
plainBlockSize
in class DecryptMode
public byte[] decrypt(byte[] source, int i, int length)
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
.
decrypt
in class DecryptMode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |