Saturday, March 28, 2020

#1 2020-03-26 01:39:54 pm

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 633
Website

Hdiutil - unable to create encrypted disk images

I noticed, mojave changed the way hdiutil works, I'm no longer able to create encrypted disk images

If I remove the command encrypt from my code things works just fine
The error is always the same whatever I change in my code

hdiutil: create failed - invalid "ioctl" for the device


Applescript:

hdiutil create -encryption aes-256 -agentpass -srcfolder " & psxSource &"
-fs HFS+ " & psxDest

Offline

 

#2 2020-03-26 07:31:24 pm

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 925

Re: Hdiutil - unable to create encrypted disk images

Hi, Joy. The actual code is obscured by your variables, and I don't have Mojave to test for changes on my current machine. There may be a quoting issue. I previously resolved an ioctl problem in the following thread, which may be a starting part for further experimentation.

https://macscripter.net/viewtopic.php?id=44637

Offline

 

#3 Yesterday 02:52:22 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 4039

Re: Hdiutil - unable to create encrypted disk images

@Joy

try to use:

Applescript:

# define the HfsPath to the source
# define the HfsPath to the dest
# then execute :
set psxSource to quoted form of POSIX path of hfsSource
set psxDest to quoted form of POSIX path of hfsDest
do shell script "hdiutil create -encryption AES-256 -agentpass -srcfolder " & psxSource & "
-fs HFS+ "
& psxDest

You may also drop the specification of the encryption level which would apply the default AES-512 one.

Other “detail”, in the man, the encryption level is defined with uppercase : AES-128 or AES-256.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) vendredi 27 mars 2020  09:46:48

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)