|
||||||||||
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.EncryptMode
org.logi.crypto.modes.EncryptCFB
This class implements 8-bit Cipherblock FeedBack mode which encrypts a whole block for each plaintext character. This makes it much slower than ECB or CBC mode, but it can be used for streaming and no garbage is ever inserted.
DecryptCFB
Field Summary |
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
EncryptCFB()
Create a new CBF-mode encrypt session with no key. |
|
EncryptCFB(CipherKey key)
Create a new CBF-mode encrypt session with the specified key. |
Method Summary | |
byte[] |
encrypt(byte[] source,
int i,
int length)
Send bytes to the EncryptCFB object for encryption. |
byte[] |
flush()
Pads the internal buffer, encrypts it and returns the ciphertext. |
CipherKey |
getKey()
Return the key used for encryption. |
int |
plainBlockSize()
Return the size of the blocks of plaintext encrypted by this object. |
void |
setKey(CipherKey key)
Set the key to use for encryption. |
Methods inherited from class org.logi.crypto.modes.EncryptMode |
close, finalize, flush |
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 EncryptCFB(CipherKey key)
public EncryptCFB()
setKey()
method has been called.
Method Detail |
public CipherKey getKey()
getKey
in class EncryptMode
public void setKey(CipherKey key)
setKey
in class EncryptMode
public int plainBlockSize()
plainBlockSize
in class EncryptMode
public byte[] flush()
flush
in class EncryptMode
public byte[] encrypt(byte[] source, int i, int length)
Encrypt length
bytes from source
,
starting at i
and return the ciphertext.
encrypt
in class EncryptMode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |