Link to home
Start Free TrialLog in
Avatar of fattumsdad
fattumsdad

asked on

What's happening here?

In the following snippet, the text is being "encrypted" or something along those lines.  I was hoping someone could tell me exactly what's being done....

char szTest[]={      
                        'T'            ^ ( char) 0x0FF,
                        'E'            ^ ( char) 0x0FF,
                        'S'            ^ ( char) 0x0FF,
                        'T'            ^ ( char) 0x0FF,
                      }

Thanks in advance,
Tony
SOLUTION
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of avizit
avizit

^ is the bitwise XOR operation

your T , E , S, T etc ate xor'ed against 0X0FF

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fattumsdad

ASKER

I see!  Thanks to each of you for the help.  I don't like having to choose between numerous good answers, so I'm increasing to 300 pts and giving 100 to each.  Thanks again!

Regards,
Tony