キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/4
3,721件の閲覧回数
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 件の賞賛
メッセージ2/4
3,707件の閲覧回数
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 件の賞賛
メッセージ3/4
3,706件の閲覧回数
Thanks for the tips guys.  They worked like a charm....
0 件の賞賛
メッセージ4/4
3,685件の閲覧回数