A little off-topic, although I don't know where else to ask ;)

To my great dismay, .NET does not have OFB cipher mode available in
the Rinjdael implementation, however looking at Wikipedia (OFB), I
should be able to use ECB with the following scheme:

Rijndael alg = new Rinjdael();
alg.KeySize=16;
alg.Mode = CipherMode.ECB;
byte[] block = new byte[16];
ICryptoTransform t = alg.CreateEncryptor(key, block);
Buffer.BlockCopy(iv, 0, block, 0, 16);  // copy iv to block to start
up
len = inputStream.Length;
while (len > 0)
{
   byte[] inputBlock = new byte[16];
   int n = inputStream.Read(inputBlock, 0, 16);
   for (int i = 0; i < n; ++i)
   {
      // Do the XOR
      block[i] ^= inputBlock[i];
   }
   outputStream.Write(block, 0, block.Length);
   len -= n;
}

???

TIA
/Rob

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to