login about faq

Hello,

I am downloading files and decrypting them on the fly. After updating to 0.66 the code below is not working.

byte[] b = new byte[524288];
byte[] decryptedChunk;
crypt.FirstChunk = true;
crypt.LastChunk = false;

Int64 received = 0;

while (!sftp.Eof(handle))
{
    b = sftp.ReadFileBytes(handle, b.Length);

    if (sftp.Eof(handle))
    {
        crypt.LastChunk = true;
    }

    decryptedChunk = crypt.DecryptBytes(b);
    fsOut.Write(decryptedChunk, 0, decryptedChunk.Length);
    crypt.FirstChunk = false;

    received += b.Length;
    Console.WriteLine(received.ToString());
}

With the previous versions (9.5.0.65) the file downloaded and decrypted successfully, but with the new one the download process not stopping at the end of the file.

Any suggestion?

Thank you!

asked Apr 29 at 05:47

dss's gravatar image

dss
36811

edited Apr 29 at 05:50


link

answered May 01 at 15:29

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

PS> This is a new build from just a moment ago..

(May 01 at 15:29) chilkat ♦♦

The downloaded files are the same as the previous :)

(May 01 at 16:01) dss

Same URL, but a new build..

(May 01 at 16:04) chilkat ♦♦

I checked the Date modified tag of the downloaded file (x64) and it is 4/30/2017 11:08 PM.

And the callback is not working.

(May 01 at 16:11) dss

Try it again. I just tested it and the DLL is from short while ago today..

(May 01 at 16:31) chilkat ♦♦

I tried on an other machine with different browser, the file is the same. I don't understand. MD5: ccfc8056ae8e897d639a1333999fb894 Size: 9,091,072 Date: 04/30/2017 11:08

(May 01 at 16:45) dss
showing 5 of 6 show all

Thanks, I'll investigate tomorrow..

link

answered Apr 29 at 21:42

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

I found the problem and made the fix. What version of the .NET Frameworks and what version of Visual Studio do you use? I can provide a new build that fixes it.

link

answered Apr 30 at 12:49

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

Great, thank you! .NET 4.5 and VS2013, 32 and 64 bit.

link

answered Apr 30 at 15:48

dss's gravatar image

dss
36811

Thank you! The download is working now, but the OnDownloadRate event is not firing. The code above worked fine with 9.5.0.65.

...
sftp.EnableEvents = true;
sftp.HeartbeatMs = 10;
sftp.OnDownloadRate += sftp_OnDownloadRate;
...

private void sftp_OnDownloadRate(object sender, Chilkat.DataRateEventArgs args)
{
    Console.WriteLine(args.ByteCount);
    Console.WriteLine(args.BytesPerSec);
}

Thank you!

link

answered May 01 at 03:01

dss's gravatar image

dss
36811

I was able to download the latest version (I have no idea what was the problem yesterday...) and everything is working fine! Thanks!

link

answered May 02 at 12:25

dss's gravatar image

dss
36811

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×227
×37
×3

Asked: Apr 29 at 05:47

Seen: 422 times

Last updated: May 02 at 12:25

powered by OSQA