11-08-2017 04:11 AM
Hi,
I'm working on a big VI, that requires to enter a username and a password to be protected all the time.
my original VI is built on QMH technique and unfortunately i can't post it.
i wanted to give the user an opportunity to create his own username and password after the first time he login to the software.
when the user runs the software he should enter (admin, admin) as temporary username and password and after that he should create his own.
in the attached mock-up VI, i created 3 taps, first one send you to the second by pressing next and the second has the username and password, the third just stop the running.
i know that i need to have 2 strings and Boolean in the third tap, which is the new username and password, and save it. but how can i make it the official username and password after first time of logging.
at the minute i'm saving the username and password that i'm entering into a spreadsheet in specific path, and this is not secure.
how can i save the information and remember it within the VI itself. (i.e: similar to your username and password in the windows desktop).
so first of all how can i create the tap that allow me to ask the user to enter his new username and password and make it the official one after he login for the first time.
second how to save it into the software itself not in spreadsheet (similar to local variable or gloable one).
please check my vi, just very simple one
thanks in advance.
11-08-2017 04:33 AM
Hi N.,
how can i save the information and remember it within the VI itself.
You cannot save data (at runtime) in the VI itself!
You need to store data in a file somewhere on your computer or network…
similar to your username and password in the windows desktop
Windows doesn't store user credentials "in the desktop". Those data are stored in a file…
11-08-2017 04:42 AM
Hi GerdW,
thanks for reply.
what you said is more accurate than what I've written.
as i'm saving in the CSV file at the minute, from my perspective i know it's not secure.
do you have any advice how to make it more secure, i thought about some kind of encryption as binary or something else. but still not quite sure what should i done.
regards,
11-08-2017 04:51 AM - edited 11-08-2017 04:52 AM
Hi N.,
i thought about some kind of encryption as binary
That's a nice idea. You will find encryption libraries in VIPM…
Usually passwords aren't saved in such databases, but only their hash. (Don't forget the salt… :D)
11-08-2017 04:53 AM
(Don't forget the salt… )
nice one GerdW.
so the most important now, how can i make the user to create his own UN and PW and make it the main after first logging. this is the biggest problem for me.
11-08-2017 06:21 AM
N.Ghrayeb wrote:
so the most important now, how can i make the user to create his own UN and PW and make it the main after first logging. this is the biggest problem for me.
You make your own dialog to make the user input their credentials and either add it to the file or check against data in the file.
11-08-2017 02:55 PM
+1 for the hash algo. Use something like SHA256 as a minimum and dont forget the salt.
Only ever store and compare against the hash.