[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding Test



On Wed, 28 Oct 1998, Ben Nes Michael wrote:
> I would like to make a program that will print a message (for example
> hello) but the word wont be seen when the file is edited.
> 
> Any suggestions ?
> --------------------------

Why don't you use a "stupid" shift encryption of some sort. 

Ex. Define an string (array) holding the letters represented by the hex
codes on the first line below. 

	50 22 6f 73 7b 6a 27 54 72 78 80 84 3b 2e 49 39   #  (IN FILE)
-        1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 10   # A simple code
-------------------------------------------------------
=       49 20 6c 6f 76 65 20 4c 69 6e 75 78 2e 20 3a 29   # (REAL STRING)

Process the string by subtracting 1 from the first letter (treat it as an 
unsigned integer), 2 from the second letter, etc.

Decoding the example (by subtracting according to the second line - excuse
me if there is a mistake in my hex arithmetic - the answer is correct,
but the top line might be off a bit) gives the "string" in the third line.
Now print it.

Obviously there are an infinite number of equally stupid encoding/decoding
algorithms inculding shifting by some fixed constant.

Tani 
(shh... I'm just lurking!)