1topic "String encryption";
2[ $$0,0#00000000000000000000000000000000:Default]
3[{_}%EN-US
4[s0;%- [*R6 String encryption]&]
5[s0;/%- &]
6[s0; The Protect packages provides also a simple way to encrypt strings,
7in the form of character arrays, along as a function that can
8retrieve the encrypted data.&]
9[s0; &]
10[s0; Let`'s look at an example : suppose you want to encrypt the following
11text:&]
12[s0; &]
13[s0; `"I`'m a really really secret text`"&]
14[s0; &]
15[s0; To encrypt it, it`'s enough to surround it by 2 macros, PROTECT`_DATA`_START
16and PROTECT`_DATA`_END :&]
17[s0; &]
18[s0; const char `*MyEncryptedText `= PROTECT`_DATA`_START `"I`'m
19a really really secret text`" PROTECT`_DATA`_END;&]
20[s0; &]
21[s0; To retrieve it in your application, it`'s enough to do :&]
22[s0; &]
23[s0; String MyDecriptedText `= PROTECT`_DECRYPT`_DATA(GetCypher,
24MyEncryptedText);&]
25[s0; &]
26[s0; And you`'ll get the decrypted text in your string.&]
27[s0; If you build your application without the PROTECT flag this
28will also work, just removing the start and end protection markers.&]
29[s0;I5; ]]