Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternatives to Crypto
Message
De
09/05/2013 12:26:21
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01573156
Message ID:
01573236
Vues:
49
>>>>>Hi,
>>>>>
>>>>>VFP 9 Help shows an example of Crypto Foundation Class which is based on Windows API routine. Given that VFP 9 was released several years ago (before even Window 7 was released), would it be practical to use it now? If not, what alternative would you recommend for encrypting a string (e.g. a password in XML file)?
>>>>>
>>>>>TIA.
>>>>
>>>>You don't encrypt a password - you hash it
>>>>
>>>>Then convert the hash to base64 and store it in the Xml
>>>
>>>I will look for the sample code on how to hash it in VFP 9. I think, if I remember correctly, you even posted such code somewhere in the past. Thank you.
>>
>>m5 hash with api - see here http://www.atoutfox.org/articles.asp?ACTION=FCONSULTER&ID=0000000627
>
>I went through the example you posted. And it works; thank you.
>
>Just curious about 2 things. In your example the value returned by ath(m.Digest) is f96b697d7cb7938d525a2f31aaf161d0 But when I run this code on my computer, the letter 'd' at the end is upper case. Is it because the difference in Cryptdll.dll? And do I understand that Cryptdll.dll is the Windows API. And if so, would this approach work if you hash the value in say Windows XP and then try to compare it in Windows 7, would it work?


> by ath(m.Digest) is f96b697d7cb7938d525a2f31aaf161d0

Use strconv(m.Digest, 15) instead - my ath() dates from the vfp6 time

> you hash the value in say Windows XP and then try to compare it in Windows 7, would it work?


I think so. For version updates, I put a new exe on a web site and also a text file that contains the MD5 checksum of the exe ( with Crypt.dll on my computer)

(1) Whilst downloading I calculate the MD5 hash. After download I compare the calculated value with the one in the text file. If different I download (the program downloads) again. Think I have customers with winXP through Win8

(2) It should be the same http://en.wikipedia.org/wiki/MD5 The algo is descbribed in RFC 1321 http://www.faqs.org/rfcs/rfc1321.html
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform