|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.logi.crypto.Crypto
|
+--org.logi.crypto.modes.DecryptMode
|
+--org.logi.crypto.modes.DecryptCFB
Use this class to decrypt ciphertext generated by EncryptCFB.
Note that unlike ECB or CBC mode, CFB mode uses the same key to encrypt and decrypt, even with asymmetric ciphers.
EncryptCFB| Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
| Constructor Summary | |
DecryptCFB()
Create a new CFB-mode decrypt session with no key. |
|
DecryptCFB(DecryptionKey key)
Create a new CFB-mode decrypt session with the specified key. |
|
| Method Summary | |
byte[] |
decrypt(byte[] source,
int i,
int length)
Send bytes to the DecryptCFB object for encryption. |
byte[] |
flush()
Flush any buffers internal to the DecryptSession object and releases any and all resources. |
byte[] |
flush(byte[] source,
int i,
int length)
Decrypt the last part of ciphertext and return plaintext. |
DecryptionKey |
getKey()
Return the key used for decryption. |
int |
plainBlockSize()
Return the size of the blocks of plaintext output by this object. |
void |
setKey(DecryptionKey key)
Set the key to use for decryption. |
| Methods inherited from class org.logi.crypto.Crypto |
binString, binString, ensureArrayLength, ensureArrayLength, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, prettyPrint, prettyPrint, readBlock, readInt, trimArrayLength, trimArrayLength, trimLeadingZeroes, writeBytes, writeBytes, writeInt |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DecryptCFB(DecryptionKey key)
throws KeyException
KeyException - if key is a public key.public DecryptCFB()
setKey() has been
made.| Method Detail |
public DecryptionKey getKey()
public void setKey(DecryptionKey key)
throws KeyException
KeyException - if key is a public key.public int plainBlockSize()
public byte[] decrypt(byte[] source,
int i,
int length)
Decrypt length bytes from source,
starting at i and return the plaintext.
public byte[] flush()
DecryptSession
public byte[] flush(byte[] source,
int i,
int length)
throws CryptoException
flush in interface DecryptSession
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright (c) 1997-2001 Logi Ragnarsson - Distributed under the GPL