Click here to Skip to main content
15,885,757 members

Comments by Midnight Ahri (Top 23 by date)

Midnight Ahri 23-Aug-14 11:26am View    
Yes, but I want to catch it before save.
When I input the same existing data, the error occur.
I'm using binding.
Midnight Ahri 31-May-14 10:24am View    
Yes I am writing my own encryption methods.
You mean directly parse the file stream to .NET encryption methods?
All right then, I'll find a way to do it in blocks too.
Thank you very much for the information. :)
Midnight Ahri 31-May-14 9:33am View    
Woah, I checked my memory left from task manager.
1.8 GB free, and when the first byte array loaded, 1.0 GB left.
And then an exception was thrown.

I had a question, I'm doing file encryption and it's already done except for large file.
Step by step are from reading file bytes into array, then while in the process of encryption, byte / byte are written in another array till complete, and finally the write process begin. In this case, I'm sure I had to load those bytes into memory and I had no choice except to limit the file size, or else I had to start the writing process while encryption is in progress. Is that possible?
Midnight Ahri 15-Apr-14 3:12am View    
Deleted
Ok, I had a question.
I tried this,
ReadAllBytes > BinaryEncryption > WriteAllBytes
ReadAllBytes > BinaryDecryption > WriteAllBytes

Any file that go thru that process will end up wrong except text document.
I tried word document and it end up corrupted.
Someone told me that it's because I encrypted the whole file.

I had just tried FileStream.Read and Write, and yes only text document worked.
Can you suggest me what read / write method to use to prevent corruption?
How about I try BinaryReader/Writer?
Midnight Ahri 15-Apr-14 1:20am View    
Thank you very much for the explanation.
I read the file to do XOR with a key and rewrite it again.
ReadAllBytes corrupt the file when WriteAllBytes executed, so I think I will try FileStream first.