Re: Read / write to the same file - WeOnlyDo Discussion board

Re: Read / write to the same file (General questions)

by dandraka, Monday, February 21, 2005, 15:49 (7214 days ago) @ wodSupport

Dimitry,

I don't think this will work. wodCrypt doesn't read entire file, it reads part by part. While I'm thinking about it, it would make sense to allow it to partially encrypt it, since encryption is based on same file chunks, but still I doubt it will work.

It doesn't, I've tested it [:sad:] It leaves me with an empty (zero bytes) file.

Why don't you encrypt to MemBlob, and then write it to a file afterwards?

That was one thing I tried, and it's OK indeed --as long as the file size is reasonable. But the file (as I said, it's a database) can well reach 500-600MB (and, rarely, maybe even 1GB). It's not like that most of the time, but it will happen.

What will happen then ? I suppose Windows will use the swap file like crazy, and on slower machines (sadly some clients still have, like, Pentium 2's with 128MB ram and Win98 [:sad:] ) this may cause hangs / BSODs / whatever.


Complete thread: