File encryption method reading whole files into a dynamic stack buffer.
[Issue#] LINUXWRT-91
[Problem] Encryption method tried to encrypt whole file at once which
may introduce problems for large files. What is more, buffer for file data
was dynamically allocated on stack but such feature is not compliant
with the C++11 standard.
[Cause] N/A
[Solution] Encrypt files chunk by chunk.
[SCMRequest] N/A
[Verification]
1. Build repository.
2. Install a test widget without encryption. Widget should launch
successfully.
3. Install the same widget with encryption enabled. Widget should launch
successfully and present the same results.
Tip: To enforce widget's content encryption add following line to
widget's configuration file:
<tizen:setting encryption="enable" />
Change-Id: Ieb1c9dfeede28bfd69f910b1d34d650b6a353795