11-10-2009 06:53 AM
Solved! Go to Solution.
11-10-2009 07:07 AM
You should store the MD5 has of the password.
In the code you let the user enter the password, calculate the hash and see if they match.
LabVIEW has build in VIs to get the hash of a string.
It is quite hard to decode a password with unkknown length from it's hash.
Additional I would still hard-code a core password only known by you that you can type in yourself. After which you can generate a new password file.
Ton
11-10-2009 07:14 AM
Since I am unfamiliar with the term "MD5 hash", I did a function search in LabVIEW. The only function I came up with was "MD5Checksum File.vi", but I can't think how it applies. Can you be more specific on how one "calculates the hash"?
11-10-2009 07:25 AM
I am sorry I thought the native MD5 function supported strings.
The OpenG toolkit has a function MD5 Message digest that support strings:
Ton
11-10-2009 07:38 AM
Use encryption. There is a free application in the fourms for Blow Fish. It is very simple and everything is encrypted.
http://zone.ni.com/devzone/cda/epd/p/id/3473
It is very easy to use.
11-10-2009 07:57 AM
11-10-2009 07:59 AM
Hi,
here's something very simple to use to to stop people just opening up the file and reading it. Change the string to a byte integer and alter the values by a known constant, then when reading the byte, alter the values back and convert to a string . Its obviously not much of an encryption but if anyone opens the file they can't read the password.