11-14-2009 12:52 AM
Hi all,
I store configuration data in an ini file and give this file a custom extension.
If users open this file in a text editor I don't want it to be readable. Without encrypting the text how can I do this?
I cant seem to get the binary VIs to work. Maybe somebody could show me?
Cheers,
Battler.
11-14-2009 05:38 AM
11-14-2009 05:42 AM
11-14-2009 10:42 PM
Nice suggestion Kode.
As variant it is still readable, though annoying to read.
Any other suggestions?
11-15-2009 12:00 AM
You haven't really defined how secure you want your data, but if you just want a simple way to hide the information from a casual user, this may work.
Obviously, if someone really wanted to, they could figure this out.
steve
11-15-2009 08:07 AM
What do you mean with "not readable"? Do you want the data to be encripted? How unconfortable shall reading data for human be?
Working with binary files should not be difficult. I would put all configuration data into one cluster, wire it to data input of the Write to Binary.VI and store it to the given file. However if you have strings with your configuration data it will be readable in a plain text editor.
11-16-2009 11:07 AM
Hello battler,
Have you considered using the Datalog VIs? You can find them here:
Block Diagram, Programming>>File I/O>>Advanced File Functions>>Datalog
The Datalog file is great for storing configuration data for your program. It is a binary file so you will not be able to open it in notepad and it stores clusters as records. Simply reading a different record entry from the file will load a different configuration.
11-17-2009 08:43 PM
Nice one. So I can use Datalog instead of ini. I'lll try it and let you know.
Cheers,
Battler.
02-02-2020 01:26 AM
The problem with datalog is it is dependent on the data type we use to create it. Suppose we create a datalog file with data type of a cluster containing a string and numeric and we wrote all the config data as clusters and stored it in a datalog file, it would be impossible for anyone to open the file without the labview program. BUT suppose in future if the config data had to incude an enum data within the cluster, the previous datalog file would be useless. We will have to create a new datalog file with the new cluster from scratch.
02-02-2020 11:13 AM
It's a strange request to me because the ONLY reason I would choose an ini file is so people can easily read it!