LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encrypt a config file

Hello all,
 
Does anyone have a simple, yet effective way to encrypt a config file?  My config file holds settings and I would like to be able to encrypt it so that no one could open the file in Notepad/Wordpad and view the settings.  The encryption does not need to be very complex, just good enough so that it wouldn't be readable in Notepad, etc.  Thanks!
0 Kudos
Message 1 of 4
(3,708 Views)
Hi,


You can XOR it with a "secret word". It's very simple, and the encription routine is the same as the decription. Simply convert both strings to an array of U8, and xor each element. If the secret word array passed it's last element, begin at the start (use a qotient & remainder, with the I and the array size-1).


Regards,


Wiebe.


"PaceLT1" <x@no.email> wrote in message news:1159971007444-423610@exchange.ni.com...
Hello all,
&nbsp;
Does anyone have a simple, yet effective way to encrypt a config file?&nbsp; My config file holds settings and I would like to be able to encrypt it so that no one could open the file in Notepad/Wordpad and view the settings.&nbsp; The encryption does not need to be very complex, just good enough so that it wouldn't be readable in Notepad, etc.&nbsp; Thanks!
0 Kudos
Message 2 of 4
(3,694 Views)
Convert your string into an array of U8 and then do some math:
shift bits, XOR  Add something.  These actions are reversable!
You could even rotate the array.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 4
(3,693 Views)
Thanks for the tips guys.  They worked like a charm....
0 Kudos
Message 4 of 4
(3,672 Views)