|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--is.logi.crypto.Crypto | +--is.logi.crypto.modes.DecryptMode | +--is.logi.crypto.modes.DecryptOFB
Use this class to decrypt ciphertext generated by EncryptOFB.
Note that unlike ECB or CBC mode, OFB mode uses teh same key to encrypt and decrypt, even with asymmetric ciphers.
EncryptOFB
Fields inherited from class is.logi.crypto.Crypto |
BIT,
cdsPath,
keySource,
NIBBLE,
primeCertainty,
random |
Constructor Summary | |
DecryptOFB(CipherKey key,
int bufSize)
Create a new OFB-mode decrypt session with the specified key . |
|
DecryptOFB(int bufSize)
Create a new OFB-mode decrypt session with no key. |
Method Summary | |
byte[] |
decrypt(byte[] source,
int i,
int length)
Send bytes to the DecryptCFB object for encryption. |
byte[] |
flush()
Pads the internal buffer, encrypts it and returns the ciphertext. |
CipherKey |
getKey()
Return the key used for encryption. |
void |
setKey(CipherKey key)
Set the key to use for encryption. |
Methods inherited from class is.logi.crypto.Crypto |
binString,
binString,
equal,
equalRelaxed,
equalSub,
fromHexNibble,
fromHexString,
fromString,
fromString,
hexString,
hexString,
hexString,
hexString,
makeClass,
makeInt,
makeLong,
makeSessionKey,
pastSpace,
pickBits,
pickBits,
readInt,
writeBytes,
writeBytes,
writeInt |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DecryptOFB(CipherKey key, int bufSize)
key
. A buffer of bufSize
bytes is created
to hold a pre-calculated xor-stream.public DecryptOFB(int bufSize)
setKey()
method has been called.
A buffer of bufSize
bytes is created to hold a
pre-calculated xor-stream.
Method Detail |
public CipherKey getKey()
public void setKey(CipherKey key)
public byte[] flush()
public byte[] decrypt(byte[] source, int i, int length)
Decrypt length
bytes from source
,
starting at i
and return the plaintext.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |