EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PUT big files using TElHTTPSClient

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#16312
Posted: 05/03/2011 03:50:33
by Aamir Khan (Basic support level)
Joined: 04/14/2011
Posts: 5

We have a requirement to encrypt and PUT big files, which cant be read into memory at once.
So we read a certain chunk of the file from the file system, encrypt and then write it to the network stream like this in C#

HttpWebRequest request = ...;
byte[] buffer = new byte[2048];
using(Stream requestStream = request.GetRequestStream())
{
using(FileStream fStream = new FileStream(...))
{
fStream.Read(buffer, 0, buffer.length);
buffer = encrypt(buffer);//encryption is done here
requestStream.Write(buffer, 0, buffer.length);
request.Flush();
}
}

How can I do this with SecureBlackBox ??

I tried creating a MemoryStream and passing it to PUT, but I see that PUT is blocking, so I cannot write anything in the MemoryStream since the application is stuck here :
client.Post(url, requestStream, false);
#16313
Posted: 05/03/2011 05:11:54
by Eugene Mayevski (EldoS Corp.)

At the moment what you need (dynamic streaming of data) is not possible with HTTPS client. I guess we can add this functionality to SecureBlackbox 9 release.


Sincerely yours
Eugene Mayevski
#16314
Posted: 05/03/2011 05:20:16
by Aamir Khan (Basic support level)
Joined: 04/14/2011
Posts: 5

I thought this was already added in December 2009 release.

https://www.eldos.com/forum/read.php?FID=7&TID=2013&MID=11222&sphrase_id=181011#message11222

Thanks,
Aamir
#16315
Posted: 05/03/2011 06:14:18
by Eugene Mayevski (EldoS Corp.)

Well, it was not, at least the change list says nothing about this.


Sincerely yours
Eugene Mayevski
#16316
Posted: 05/03/2011 06:17:12
by Eugene Mayevski (EldoS Corp.)

In fact, you can implement your own virtual stream class, which will not hold all the data but will read them from the different source.


Sincerely yours
Eugene Mayevski
#16326
Posted: 05/03/2011 08:50:13
by Aamir Khan (Basic support level)
Joined: 04/14/2011
Posts: 5

Thanks, will try that.
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 1143 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!