org.logi.crypto.modes
Class OFBProducer

java.lang.Object
  |
  +--org.logi.crypto.Crypto
        |
        +--org.logi.crypto.Producer
              |
              +--org.logi.crypto.modes.OFBProducer
All Implemented Interfaces:
java.lang.Runnable

public class OFBProducer
extends Producer

This class is used by EncryptOFB and DecryptOFB to precalculate the keystream.

Author:
Logi Ragnarsson (logir@logi.org)
See Also:
EncryptOFB, DecryptOFB

Fields inherited from class org.logi.crypto.Crypto
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO
 
Constructor Summary
OFBProducer(CipherKey key, int bufSize)
          Create new OFB thread with the given key and buffer size, but random IV.
 
Method Summary
 void calculate(byte[] buf)
          Calculate the next bytes from the key-stream and put in buf.
 
Methods inherited from class org.logi.crypto.Producer
kill, nextBuffer, run
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OFBProducer

public OFBProducer(CipherKey key,
                   int bufSize)
Create new OFB thread with the given key and buffer size, but random IV.
Method Detail

calculate

public void calculate(byte[] buf)
Calculate the next bytes from the key-stream and put in buf. We know that the size of buf is an even multiple of the size of input blocks.
Overrides:
calculate in class Producer


Copyright 1997-2000 Logi Ragnarsson