Zip file to store passwords
Posted: 08 Nov 2021, 05:48
I would like to have an plain text file on my hard disk that holds some information that I want to secure, so I would like it to be zipped up in a password protected zip file (this is more than enough security for my needs).
I would like the first time that I access this file when my AHK file is loaded to ask me for the password, and then hold onto that password in a variable for the duration of the AHK file being loaded such that it opens the zip file and can read / alter the text file that is in there (i.e. without creating a temp file ideally, read the file into memory and then write the file back into the zip file). After I restart my AHK script, I would need to re-input the password the first time.
Does anyone have some templates that could help get me started with doing this? Tasks like:
• Create a zip file from a text file
• Opening the zip file, request password, then hold that password for all subsequent access
• Read contents of file inside zip file into memory, then modify it as required, then update the file into the zip file
I would like the first time that I access this file when my AHK file is loaded to ask me for the password, and then hold onto that password in a variable for the duration of the AHK file being loaded such that it opens the zip file and can read / alter the text file that is in there (i.e. without creating a temp file ideally, read the file into memory and then write the file back into the zip file). After I restart my AHK script, I would need to re-input the password the first time.
Does anyone have some templates that could help get me started with doing this? Tasks like:
• Create a zip file from a text file
• Opening the zip file, request password, then hold that password for all subsequent access
• Read contents of file inside zip file into memory, then modify it as required, then update the file into the zip file