LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

password protected button command in CVI

Solved!
Go to solution

Hi,

   In my application, i have a settings button on which i am setting machine parametter. One way to protect settings by codeing that popup panel and input string that should be match with hard coded text in the program. After completion of development and generating instalable, we are not able to change that text (password).

 

Is there any way to put password projection in such case, when i press button for settings, it will first ask for password and after correct password it will allow for settings.  And that password can be changable by user.

 

Regards

Vishnu Patel

0 Kudos
Message 1 of 6
(5,614 Views)
Solution
Accepted by topic author Vkumar

Hello Vishnu,

the task you are asking for is normally developed via the toolslib Password custom control: a sample project that demonstrates its use can be found here; as you can see from the example, this instrument hans been included in CVI for several releases so you should not have problems in finding and using it.

 

Whed thinking to password protection, it is important to discuss how to save the password in the system to avoid they can be understanded from non-authorized personnel: in this case, my example of integration bewteen CVI and native Windows hashing functions can be of help



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 6
(5,609 Views)

Hi,

   Thank you for help

--Vishnu

0 Kudos
Message 3 of 6
(5,529 Views)

Hi,

For some reason I cant access your example on the topic. It displays ACCESS DENIED.

Any way I could get a valid link?

Thank you.

0 Kudos
Message 4 of 6
(3,592 Views)

Apparently the example I posted at the time hasn't migrated to the new code exchange area.

Attached is the code I originally developed; it requires the interface to Win32 APIs to be installed in CVI environment. I'm not sure it will work in base version of CVI, if that is the one you are using.

 

Basically, the example takes the text you enter in the input field and generates a "signature" (hash) on that. It permits you to store the original hash and check with another text whether the two hashes match or not. Since hashing is a one-way algorithm (i.e. produces a unique output but you cannot rebuild the original text from the hash), the underlying idea is that you can store the hash instead of the password; when the user logs in again you calculate the hash from the password he enters on the login screen and compare it with the stored one.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 5 of 6
(3,570 Views)

Thank you for prompt response!

0 Kudos
Message 6 of 6
(3,549 Views)