Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice for en-/decrypting large files with less memory

I want to develop an Android app for encrypting and decrypting large files (~500Mb) with RSA and some symmetric encryption algorithms. How can I achieve this? What is the best solution to use on devices with just a few MB RAM?

Regards Bobby

like image 970
Basic Coder Avatar asked Jan 22 '13 23:01

Basic Coder


1 Answers

CipherInputStream and CipherOutputStream let you use streams for encryption/decryption. This should let you deal with large file sizes without too many issues with memory. Sounds like you're already going down the right path with a combination of symmetric and asymmetric algorithms as RSA alone won't handle a large block of data.

like image 170
kabuko Avatar answered Sep 28 '22 07:09

kabuko