Peter,
Not sure if this is any help at all, but I am struggling through the
CryptoAPI myself at the moment and came across this code excerpt
// Determine number of bytes to encrypt at a time. This must
be a multiple
// of ENCRYPT_BLOCK_SIZE.
dwBlockLen:=1000-1000 mod ENCRYPT_BLOCK_SIZE;
// Determine the block size. If a block cipher is used this
must have
// room for an extra block.
if ENCRYPT_BLOCK_SIZE>1 then
dwBufferLen:=dwBlockLen+ENCRYPT_BLOCK_SIZE
else
dwBufferLen:=dwBlockLen;
Does this help, It doesn't apply to me as I am using RC4 with an
ENCRYPT_BLOCK_SIZE of 1.
Michael Darling
Solutions Analyst/Developer
ROOM Solutions Ltd
mailto:[EMAIL PROTECTED]
-----Original Message-----
From: Peter Laman [mailto:[EMAIL PROTECTED] wrote
Hello,
I'm trying to use the MS CryptoAPI to encrypt/decrypt a large amount of
data. Because of the size of the data, I use a RC2 block cipher
repeatedly. Both the calls to CryptEncrypt and CryptDecrypt specify a
hash, so the data can be checked. Now the encrypting/decrypting is OK,
until the last block. When I try to decrypt the final block,
CryptDecrypt returns rubbish after having correctly decrypting all
preceding blocks of data. Only with small data, < 1 block, the
decryption is OK. Has anybody experienced this before?
*******************************************************************
CONFIDENTIALITY NOTICE/DISCLAIMER
This email and any attachments are confidential, protected by
copyright/intellectual property rights and may be legally privileged. The
information transmitted is intended only for the person or entity to which it
is addressed. If you are not the intended recipient, dissemination or copying
of this email is prohibited.
If you have received this in error, please notify us by forwarding this email
to the following address: [EMAIL PROTECTED] , and then delete the email
completely from your system.
This email and any attachments have been scanned for computer viruses by a
market leading anti-virus system. However, it is the responsibility of the
recipient to conduct its own security measures. No responsibility is accepted
by ROOM Solutions Limited for loss or damage arising from the receipt or use of
this email and any attachments.
No responsibility is accepted by ROOM Solutions Limited for personal emails.
ROOM Solutions Ltd, http://www.roomsolutions.net
********************************************************************
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk