Thanks!  I posted the updated code.

Paul

David García wrote:
Hi,

It was easy to spot the bug and fix it. The problem was related to the way the last block size was computed.

Other changes I've also made:
Paul, would you please publish the new version on the web?

Regards,
   David


On Thu, Oct 29, 2009 at 11:14 AM, David García <david.garcia@vocali.net> wrote:
Thanks for the test file.

It definitely is a bug.
I'm working on it now and will be back when it's fixed.

Sorry for the inconvenience.


On Thu, Oct 29, 2009 at 10:04 AM, 赵鲁 <zhaolu@ceopen.cn> wrote:
 
 
 
2009-10-29

赵鲁

发件人: David_García
发送时间: 2009-10-29  16:38:00
收件人: 赵鲁
抄送: aescrypt; Paul E. Jones
主题: Re: Re: [aescrypt] [Fwd: java aes crypt could not support the excel]
OK. I'll try to reproduce it, but it would be easier if you could send me a test file (XLS that fails).

On Thu, Oct 29, 2009 at 2:13 AM, 赵鲁 <zhaolu@ceopen.cn> wrote:
yes,I tried XLS files with different sizes,but not success.
 
 
2009-10-29

赵鲁

发件人: David_Garc韆
发送时间: 2009-10-28  20:46:40
收件人: Paul E. Jones
抄送: 赵鲁; aescrypt
主题: Re: [aescrypt] [Fwd: java aes crypt could not support the excel]
Hi,

Most probably, the bug is related to the way the file size modulo is computed, as the algorithm behavior has nothing to do with file types.

Could you try XLS files with different sizes?
Could you provide the XLS file or, if not possible, the size of your XLS file?

Thanks.

   David


On Wed, Oct 28, 2009 at 1:18 PM, Paul E. Jones <paulej@packetizer.com> wrote:
That should definitely not happen.  The fact it is an XLS file should also make no difference at all.  Perhaps there is a bug with either reading or writing the file modulo?

David, would you be able to provide some guidance?

Paul

赵鲁 wrote:
 
For example , I decrypt the file of a.xls.aes with java AESCrypt , but the decrypted file a.xls couldn't opened normally .
I modify the code in the AESCrypt.java
<old code>
if (block == 1) {
len = in.read(); // 4 bits size mod 16.
debug("4 bits size mod 16: " + len);
}
out.write(text, 0, len);
<new code>
if (block == 1) {
if (!toFile.toLowerCase().endsWith(".xls")) {
len = in.read(); 
debug("4 bits size mod 16: " + len);
}
}
out.write(text, 0, len);
 
now ,I can open it normally.
 
 
2009-10-28

赵鲁

发件人: Paul E. Jones
发送时间: 2009-10-27  16:15:37
收件人: aescrypt; 赵鲁
抄送:
主题: [Fwd: java aes crypt could not support the excel]

  赵鲁,

I am forwarding your message to the AES Crypt mailing list to see if others might be able to help you.  However, it's not entirely clear what the issue is, so can you clarify it further?

Thanks,
Paul

-------- Original Message --------
Subject: java aes crypt could not support the excel
Date: Tue, 27 Oct 2009 10:26:50 +0800
From: 赵鲁 <zhaolu@ceopen.cn>
To: support <support@packetizer.com>


   
Hi£º
   
java aes crypt could not support the excel  , please give me a help ,thanks very much.
 
 
 
zhaolu
2009-10-27