LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save an encoded file

i want to generate a file in run mode and that file contain username and password and i dont want to save as text file
is there away i can save it in encoded file that cant be opend easily?

another quistion : how can I make curren value in a string control defualt in run mode?
many thanx
0 Kudos
Message 1 of 7
(3,459 Views)
To make a string control's value the default at runtime, enter your text (while the vi is not running) right click on the control, select Data Operations, Make Current Value Default. To save the file in a way that can't be viewed by others would probably require you to encrypt it. If it is just to keep the casual user from knowing the passwords the the encryption scheme can be fairly simple, for more serious work there have been threads about various encryption schemes on this forum.
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 7
(3,446 Views)
thanx alot
but i want to change that default value while iam on run time
0 Kudos
Message 3 of 7
(3,445 Views)

mana111;

Users will always be able to open the file, some way or the other. What you don't want is the ability to understand it - you want to preserve the confidentiality. First, you need to determine what needs to be protected. Usually the username is known and therefore no protection is provided. The password always need protection. Also, you need to determine your recovery procedures. Users WILL forget their passwords. That has an impact on how to protect the password. If you want the ability to tell the user their password, then you may want to encrypt the password so the administrator can decrypt it. If instead you want to give them a new password, then you can hash the password. With that technique you won't be able to recover the lost password. If you encrypt the password, you need to have a key management scheme because you need to manage the key that encrypt the passwords - that is equivalent to a master key.

I've seen systems where the password does more than just authenticate the user. It is also used as a key to encrypt additional information. If that's your case, you need to encrypt the password. There are other considerations for your systems. The ideal way to understand the best solution is via a security assessment.

Check Crypto-G: www.visecurity.com. It is a very good library with algorithms for encryption, hashing (message digest) and other cryptographic functions.

Regards;

Enrique

www.vartortech.com
0 Kudos
Message 4 of 7
(3,441 Views)
 

If you want to change the default value at run time, you will need a config file. When you start the program, read the config file and load the value. When you exit the program, write the config file.

Config files can take many forms.  The easiest is to use the LabVIEW Configuration File VIs (submenu of the File I/O palette). I prefer HDF5 based config files for their speed and flexibility, but the learning curve there is pretty high. Look at Can I Edit and Create Hierarchical Data Format (HDF5) files in LabVIEW? for more information, but be prepared for a lot of work.

0 Kudos
Message 5 of 7
(3,421 Views)
the www.visecurity.com site is not working
0 Kudos
Message 6 of 7
(3,405 Views)
Try http://www.jyestudio.com/visecurity/
www.vartortech.com
0 Kudos
Message 7 of 7
(3,395 Views)