Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Encrypting data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00524744
Message ID:
00582032
Vues:
38
Quick VFP example (since the docs are not all that straight-forward).
	Clear
	cString = Space(47)
	
	oEnc = CreateObject("CAPICOM.EncryptedData")
	oEnc.Algorithm = 3	&& 3-DES
	oNetwork = CreateObject("WScript.Network")
	cHostname = oNetwork.ComputerName
	oEnc.SetSecret(cHostName)

	oEnc.Content = cString
	cEncText = oEnc.Encrypt
	? cEncText
	? Len(cEncText)

	Create Cursor HoldPasses (cEnc c(254))
	Insert Into HoldPasses (cEnc) Values (cEncText)

	oEnc.Decrypt(cEncText)
	cPlainText = oEnc.Content 
	? cPlainText
	? Len(cPlainText)
In my app, I am keeping the string length to 47 characters so the hash will fit in a 254-byte character column in my tables.











>Thanks Steve
>
>I'll take a look at that.
>
>Nick Mason
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform