Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
*** URGENT *** Bitwise XOR of character string
Message
De
28/03/1997 22:00:49
 
 
À
28/03/1997 21:10:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00026103
Message ID:
00026107
Vues:
35
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform