Jump to content

Creating a password protected Zip file to store data files


Recommended Posts

Does any one have an idea on how to password encrypt an Excel file (or csv) in LabVIEW or zip up the excel file/csv and add a password to it that way? I need to be able to add a simple encryption to confidential patient data files after they are created and be able open them to read later by the same program.
 
I've tried using OpenG to add a password protection to a Zip file but when I try to add a string variable to the password connector it says password (none) so it makes me feel like I'm doing this wrong. 
 
I couldn't really find any similar documentation or tutorials on creating a csv or excel file then zipping up the file and adding a password to the zip with OpenG though I read about the function on the Labview forums.
 
A few other things over I've tried recently:
 
I think a solution would be to use some sort of property/ invoke node with ActiveX like I've attempted to do in the picture below but I can't find anything that explains exactly how property and invoke nodes work with ActiveX to achieve what I wanted, and I was hoping someone would have a tutorial that a LabVIEW beginner like me could use. 
Inline image 1
 
Something else that I looked at was adding a "blowfish" encryption to encrypt the data but seemed extremely complicated and all I need is a simple password encryption.
 
Finally I tried using an add on called AES crypto but I felt that the encryption methods that were featured in the add on were limiting. For patient names they would be at different lengths and in the example programs it showed that if a string was shorter than 128 bits then it would't be able to encrypt the string. Which is an issue if the patient has even a regular length name.
 
If you have any thoughts or find anything useful let me know.
 
Thanks, 
From a beginner
usmanf
Link to post

4 hours ago, usmanf said:
Does any one have an idea on how to password encrypt an Excel file (or csv) in LabVIEW or zip up the excel file/csv and add a password to it that way? I need to be able to add a simple encryption to confidential patient data files after they are created and be able open them to read later by the same program.
 
I've tried using OpenG to add a password protection to a Zip file but when I try to add a string variable to the password connector it says password (none) so it makes me feel like I'm doing this wrong. 
 
....
Finally I tried using an add on called AES crypto but I felt that the encryption methods that were featured in the add on were limiting. For patient names they would be at different lengths and in the example programs it showed that if a string was shorter than 128 bits then it would't be able to encrypt the string. Which is an issue if the patient has even a regular length name.

Presumably there is an inverse of this function: https://forums.ni.com/t5/LabVIEW/Excel-ActiveX-password-encryption/td-p/3599665

 

I can't speak to the openG library specifically, but a typical pattern for labview front panel items is to indicate the default in parenthesis (hence the "error in (no error)" you see on most VIs). I would say in general that you should only follow this pattern if the default is unexpected, so a default of no password would not require an indication.

 

For the AES, you could pad the result although I dont know how that effects the strength https://en.wikipedia.org/wiki/Padding_(cryptography)

 

Link to post

The (none) in parenthesis means simply that if you leave this input unconnected, that there will be no password applied. Theoretically you could also apply an empty password, which would result in an encrypted file but with a very week password key. In the OpenG library there is no difference in wiring nothing to the input and wiring an empty string to it. LabVIEW doesn't give the ability to distinguish between the two for subVIs with the normally available possibilities. Still I feel it is useful to indicate in the control label what the default value of a control does mean, especially since there is this possible ambiguity between using an empty password or none.

Simply wire your password to that input and then the specific file should be encrypted with this password and stored in the archive. Theoretically you can even use different passwords for each file but that will be problematic with most other ZIP archive viewers as they typically don't allow to enter different passwords for different files inside an archive.

Testing this would have cost you not more time than writing your post here. Simply connect a password to that input string and then try to open the ZIP file in some other ZIP utility (Windows explorer extension, WinZIP or my favorite 7-ZIP).

Edited by rolfk
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By drjdpowell
      I am just starting on trying to be able to use Python code from a LabVIEW application (mostly for some image analysis stuff).  This is for a large project where some programmers are more comfortable developing in Python than LabVIEW.  I have not done any Python before, and their seem to be a bewildering array of options; many IDE's, Libraries, and Python-LabVIEW connectors.  
      So I was wondering if people who have been using Python with LabVIEW can give their experiences and describe what set of technologies they use.
    • By Yaw Mensah
      I have installed Labview 2020 on Dedian Buster using the rpm to deb conversion method via alien. Due to Architecture mismatch i deleted the *i386.rpm files before conversion.
      My Problem is that after creating a project at "Build Specification"-> "rigth click" i am only able to select "Source Distribution". Application does not show up as an option. 
      I will be grateful for any suggestions.
      Thank you in advance.
    • By javier_r
      VIPM.io now allows you to post LabVIEW Resources, Ideas, and Tools. For example, you could post a link to a video tutorial or blog article about a package. You can also post ideas, like feature requests or new tools. Best of all, package developers are notified when you post your ideas and resources, and you can comment and discuss posts with the community. Take a look at this video to learn more: https://www.vipm.io/posts/664960df-f111-4e13-989a-24be8207182d/

    • By Shuvankar Das
      I want to connect My ccd camera with labview. The details of my system is given bellow. I cannot connect it please help   OS:  WINDOWS 7, 64bit   LabView Run-Time 2013(64-bit) NI-IMAQ 4.8 NI-IMAQdx 4.3   Camera: QICAM Monochrome Cooled (QIC-F-M-12-C) Model QICAM Resolution 1392 x 1040 Sensor 1/2" Sony ICX205 progressive-scan interline CCD Pixel Size 4.65 x 4.65µm Cooling Type Peltier thermoelectric cooling to 25˚C below ambient Digital Output 12 bit Video Output FireWire (IEEE 1394b) Max. Frame Rate 10 fps full resolution @ 12 bits Pixel Scan 20, 10, 5, 2.5MHz Mount Type C-mount optical format  
       
    • By javier_r
      Hello everybody!
      Wondering how many people have tried the new vipm.io site. We have added a ton of features to make it easy to Discover LabVIEW Tools and there are some cool ones coming soon.
      Check it out and let me know what you think 😀
       
      Javier

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.