
Creating a password-protected (encrypted) disk image?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Creating a password-protected (encrypted) disk image?
I think it's not possible, but I ask to see if somebody has some ideas about... is it possible to create a password-protected (encrypted) disk image under macOS with LiveCode? 

Re: Create a password-protected (encrypted) disk image?
Hi,
no MacOS here, but in Win I'd just use 7zip. Putting the image into a password protected archive, via cmd line & shell call. I'm sure one of the Mac or Unix tools available for you can do this, too.
Have fun!
no MacOS here, but in Win I'd just use 7zip. Putting the image into a password protected archive, via cmd line & shell call. I'm sure one of the Mac or Unix tools available for you can do this, too.
Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
Re: Creating a password-protected (encrypted) disk image?
Thank you axwald, do you know if there is a tutorial available to use cmd line & shell call?
Re: Creating a password-protected (encrypted) disk image?
Hi,
7-zip itself is at:
- SourceForge download page or at:
- 7-Zip download page
The documentation ("7-zip.chm") is included in the program package (and in my demo).
I have a link to a 3rd party HTML version too (only cmd line part) that looks innocent. *1)
The files needed to use 7-Zip as cmd line tool are in the "7-Zip Extra" packages.
A tiny stack that demonstrates the procedure is attached (script in button). You need to place a "7za.exe" (cmd line engine from a "extra package") into the folder "externals" - it's too big for the forum (637 KB).
For Linux/ Mac, there's similar tools afaik. 7-zip has some ports (see the web sites above), but I didn't try these yet.
Have fun!
*1): 7-Zip is a popular tool, so be cautious - its quite easy to find infected or malevolent versions of it. But we are smart and only grab our software from trusty sources, right?
7-zip itself is at:
- SourceForge download page or at:
- 7-Zip download page
The documentation ("7-zip.chm") is included in the program package (and in my demo).
I have a link to a 3rd party HTML version too (only cmd line part) that looks innocent. *1)
The files needed to use 7-Zip as cmd line tool are in the "7-Zip Extra" packages.
A tiny stack that demonstrates the procedure is attached (script in button). You need to place a "7za.exe" (cmd line engine from a "extra package") into the folder "externals" - it's too big for the forum (637 KB).
For Linux/ Mac, there's similar tools afaik. 7-zip has some ports (see the web sites above), but I didn't try these yet.
Have fun!
*1): 7-Zip is a popular tool, so be cautious - its quite easy to find infected or malevolent versions of it. But we are smart and only grab our software from trusty sources, right?
- Attachments
-
- Axwald_ZipTest.zip
- A little demo
- (97.4 KiB) Downloaded 323 times
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
Re: Creating a password-protected (encrypted) disk image?
Thank you so muc AxWald for the very useful info!
PS
Yes, we only grab our software from trusty sources!
PS
Yes, we only grab our software from trusty sources!

Re: Creating a password-protected (encrypted) disk image?
Hi,
about trusty sources: I just found out that a port of 7-Zip is in at least the Debian repositories (as "p7zip"), and on my Linux Mint 18/ Mate it's actually installed by default. So the demo stack should run there, with a minimal modification ;-)
The cmd line tool I use ("7za.exe") comes in the package "p7zip-full" and can be invoked simply by "7za".
Have fun!
about trusty sources: I just found out that a port of 7-Zip is in at least the Debian repositories (as "p7zip"), and on my Linux Mint 18/ Mate it's actually installed by default. So the demo stack should run there, with a minimal modification ;-)
The cmd line tool I use ("7za.exe") comes in the package "p7zip-full" and can be invoked simply by "7za".
Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
-
- Posts: 1
- Joined: Sat Jan 26, 2019 4:52 am
Re: Creating a password-protected (encrypted) disk image?
I agree the 7zipguides is impressed me with the completeness of its feature set, and the ease of used...Thanks for recommending this...
Re: Creating a password-protected (encrypted) disk image?
You could use
put "hdiutil create -volname 'targetvol' -encryption -srcfolder 'pathtodatafolder' -ov -format UDRO 'nameofnewdmg.dmg'" into mycmd
put shell(mycmd)
-- targetvol (What your disk image icon name will be)
-- pathtodatafolder (can be a folder or existing drive) - where the data is copied from
-- 'nameofnewdmg.dmg' (destination dmg file).
the encryption flag in the command will cause OSX to display a dialog when creating the DMG asking you to choose a password.
put "hdiutil create -volname 'targetvol' -encryption -srcfolder 'pathtodatafolder' -ov -format UDRO 'nameofnewdmg.dmg'" into mycmd
put shell(mycmd)
-- targetvol (What your disk image icon name will be)
-- pathtodatafolder (can be a folder or existing drive) - where the data is copied from
-- 'nameofnewdmg.dmg' (destination dmg file).
the encryption flag in the command will cause OSX to display a dialog when creating the DMG asking you to choose a password.