LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating username/ password and Save it

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. 

 

 

0 Kudos
Message 1 of 7
(4,076 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(4,057 Views)

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, 

0 Kudos
Message 3 of 7
(4,048 Views)

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)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(4,043 Views)

 (Don't forget the salt… Smiley Very Happy)

 

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. 

0 Kudos
Message 5 of 7
(4,038 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(4,016 Views)

+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.

 

 

0 Kudos
Message 7 of 7
(3,995 Views)