Re: A89: Re: Preliminary TI-GCC IDE update


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

Re: A89: Re: Preliminary TI-GCC IDE update




Rob Smith wrote:
> 
> At 9/11/00 05:09 PM, you wrote:
> >   Password[I]^=Key;    /*This line seems to create the problem */
> there is no exponentiation operator in c, you will have to write that
> function your self.

The symbol '^' is the C equivalent of 'xor' operator. It can be used to
encrypt some datas in a very simple manner. Indeed, an interresting
property of the 'xor' operator is that it verifies the following :
  Let's say that b = a ^ key; Then we have : a == b ^ key
So, if you apply a 'xor' operation on every member of, let's say, a
string, then the string won't be readable anymore. Then, if you perform
the same operation again, the string will become readable again. I guess
that is what this code is intended to do.



References: