Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Encrypting data
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00524744
Message ID:
00582032
Views:
37
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform