Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Numeric SYS(2007) to text Value

Status
Not open for further replies.

jester4281

IS-IT--Management
Sep 12, 2002
160
US
I am writting a app that stores the individual users password in a numeric code I generate using the SYS(2007, username). This way the password is not 100% visible in the database and only I or someone running the actual program can see the text value.

How can I convert the numeric value to the text value.

Ex. User puts in joedoe it generates 45653, I then want to show th joedoe expression on the form.
 
You cannot back a text input out of a checksum value. All strings evaluate to one of 65,000 is number combinations.

You'd have to store the username (possibly encrypted?). You might want to consider a more complicated function than just a single checksum if you want your app to be truely secure.

Brian
 
I do not think it is possible since it is not unique for a character expression. Meaning that more than one character expression can generate the same number since there are only 99999 values that can be generated for the universe of character expressions.

You could develop your own encrption algorithm and use the developed logic to display the actual values.



 
Do a keyword search for encryption. You will find several threads including thread184-602848

Brian
 
Jester,
For individual fields, check out:
A freeware solution to encryption is the CryptPak by Milan Kosina (
Another is CIPHER50.FLL based on work by Tom Rettig and available at the UT ( ) in the Download area.

VFP 7.0 & 8.0 have a Crypto API component in the Foundation Classes that uses the MS API encryption.

Rick
 
How about the encryption used by some of the programmers in .Net environment, Can I incorporate the same encryption process in my Visual Foxpro program?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top