How to access an encrypted INI file from C on an embedded system with little RAM
Posted
by
Mawg
on Programmers
See other posts from Programmers
or by Mawg
Published on 2012-11-07T02:11:49Z
Indexed on
2012/11/07
5:14 UTC
Read the original article
Hit count: 351
I want to encrypt an INI file using a Delphi program on a Windows PC.
Then I need to decrypt & access it in C on an embedded system with little RAM.
I will do that once & fetch all info; I will not be consutinuously accessing the INI file whenever my program needs data from the file.
Any advice as to which encryption to use? Nothing too heavyweight, just good enough for "Security through obscurity" and FOSS for both Delphi & C.
And how can I decrypt, get all the info from the INI file - using as little RAM as possible, and then free any allocated RAM?
I hope that someone can help.
[Update] I am currently using an Atmel UC3, although I am not sure if that will be the final case. It has 512kB falsh & 128kB RAM. For an INI file, I am talking of max 8 sections, with a total of max 256 entries, each max 8 chars.
I chose INI (but am not married to it), because i have had major problems in the past when the format of a data fiel changes, no matter whether binary, or text.
For tex, I prefer the free format of INI (on PC), but suppose I could switch to line_1=data_1, line_2=data_2
and accept that if I add new fields in future software erleases they must come at the end, even if it is not pretty when read directly by humans.
I suppose if I choose a fixed format text file then I never need get more than one line into RAM at a time ...
© Programmers or respective owner