Sure, you need a function/anti-function (also called an inverse function) pair that takes some input X<->Y (X back and forth to Y). This can be a simple encoding (like Base64), or an encryption.
i.e. Given some input X (where X is the numerical value of the text; either the ASCII values of the characters, or the Unicode values if a Multi-byte character set.) f(X) = Y and -1 -1 f (Y) = X (f is the inverse function of f(X) here.) While we could give you an example, that would defeat the purpose, as whoever gave you the example would know how to decode your text in the case of an encoding! There have been many posts on this list about encryption, and you can Google for "encryption functions" or some such, too. I think the MBS plugin and/or Einhugur maay have an RB encryption implementation. Also, make sure that after you decode it, that you restore the original string's encoding (such as UTF-8 if you started with UTF-8), or RB could get confused and display garbage! :) Note that a hash function is NOT - in general - inverse-able. i.e. a hash function, such as MD5, is designed to be difficult to obtain an inverse of. So don't mistakenly use a hash function, or you'll never get your original (plain-text) back! A CRC (Cyclic-Redundancy Check) is another type of hash. On Apr 14, 2007, at 4:41 PM, Lennox Jacob wrote: > Hello, > > My app save its files as text documents. > > Is it possible for me to scramble the text on saving (and > descramble on opening) so that it is not easily read if opened by > any text editor app? > > Kindly advise/assist. > > Thanks. > > Lennox. > > > --------------------------------- > Ahhh...imagining that irresistible "new car" smell? > Check outnew cars at Yahoo! Autos. > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
