Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text Encryption - what was that command?!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00101352
Message ID:
00101362
Vues:
16
Sarah,

One easy method of encrypting text is to XOR each character with a key character. When you XOR the result with the key again it'll give back the plaintext:

lcPlainText = "A"
lcKey = "#"
lcEncrypt = chr( bitxor( asc( lcPlainText ), asc( lcKey ) ) )
? lcEncrypt
lcDecrypt = chr( bitxor( asc( lcEncrypt ), asc( lcKey ) ) )
? lcDecrypt

Just step through the text one character at a time. To make it a little harder you could also change the positions of some of the encrypted text, like reverse it or transpose every other character.

>Ages ago I worked on a fox 2.6 system which encrypted passwords and stored them in a text field. Next time the user logged in the password was encrypted and and checked against the stored version.
>
>I've looked through help and can't find the command to do the encryption. Can anyone help me?
>
>What I plan to do is issue the people who buy my program a code based on their surname (last name) and both will be entered into the system. If the surname, when encrypted, doesn't match the code then reports and exports are disabled. The users surname is printed on all reports so if they pass the software around they'll have to have another person's name on all their stuff which will hopefully aggravate them into buying a legit copy.
>
>Maybe someone else has a better idea? or method?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform