Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Crypto Class
Message
De
03/03/2010 10:50:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01452254
Message ID:
01452265
Vues:
69
>>I've written a couple of routines for my customer to encrypt several fields in a table, so that the data can't be copied & taken off site
>>
>>I've used the "_cryptapi" class, (customers preference)
>>
>>Using the class if I encrypt a string, decrypting it gives me my original string, but when I put the encrypted string into the original field that the string is from in the table, when I read it back later and decrypt it I sometimes get the right results, sometimes I don't.
>>
>>TAI
>
>This is because of the spaces. You may want to add some extra characters (say, char(0)) to the end of the string so it's always padded to the right length.


Bad idea. Encrypted data may contain all chars ( 0x00 - 0xff )
Therefor - as suggested - use memo nocptrans ( or memo binary)
(1) original length back
(2) no codepage translation
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform