Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
*** URGENT *** Bitwise XOR of character string
Message
From
28/03/1997 22:00:49
 
 
To
28/03/1997 21:10:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00026103
Message ID:
00026107
Views:
37
>I need to do a bitwise XOR of a character string!!!! How do I do this???? HELP!!!!!!!!!!!!
>
>Craig

I understand you need to XOR 2 strings, not just one. That's how:
lcResult = ""
lnMaxLength = max( len( s1), len( s2))
for lnI = 1 to lnMaxLength
   lcResult = lcResult + chr( bitxor( asc( substr( s1, lnI, 1)),;
                                      asc( substr( s2, lnI, 1))))
endfor
Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform