Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
*** URGENT *** Bitwise XOR of character string
Message
De
28/03/1997 22:36:43
 
 
À
28/03/1997 22:00:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00026103
Message ID:
00026111
Vues:
34
>>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

Yeah...I kept thinking that I'd seen an XOR function....posted the message, then went thumbing though the language referece and found BITXOR(). You're example helps LOTS....now if I can just figure out what the second number (string) is, I'll be set

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform