encrypting and/or decrypting large files (AES) on a memory and storage constrained system, with “catastrophe recovery”

前端 未结 3 441
一生所求
一生所求 2021-01-01 03:50

I have a fairly generic question, so please pardon if it is a bit vague.

So, let\'s a assume a file of 1GB, that needs to be encrypted and later decrypted on a given

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 04:52

    You have to work with the large file in chunks. Break a piece of the file off, encrypt it, and save it to disk; once saved, discard the unencrypted piece. Repeat. To decrypt, grab an encrypted piece, decrypt it, store the unencrypted chunk. Discard the encrypted piece. Repeat. When done decrypting the pieces, concatenate them.

提交回复
热议问题