Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a way to confirm that an image is encrypted? When I choose "Get info" in Finder, it reveals nothing, and when I use Disk utility I also can't seem to see the information.

I know I could try mount it on another machine and see if I need to use a password, but I'm looking for a clean way to get OSX to tell me that it's encrypted.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Here's a few ways to check. The last one only works in Lion. The third one is probably the easiest if you're comfortable using Terminal.


Lock All Keychains

A quick way to check is to open Keychain Access (found in /Applications/Utilities/), choose File > Lock All Keychains, then try to mount the disk image.

If it's encrypted, you should get a message like

diskimages-helper wants to use the "login" keychain

and be prompted for the keychain password (same as your OS X login password). If it's not encrypted, it will simply mount.


Search login Keychain

Instead of locking all keychains, you could instead search for your disk image in the login keychain: Select the login keychain, then type the name of the .sparseimage file in the search field.

However, if the .sparseimage name has been changed since it was created, it won't show up in the login keychain with the new name.

If you don't find your disk image you can try the Lock All Keychains method above or the Terminal method below to be certain.


Terminal Command

You can enter the following command to check if the disk image is encrypted:

hdiutil imageinfo /path/to/image | grep Encryption

Replace the /path/to/image with the path to the disk image. If the disk image is encrypted, the command will return something like:

     Encryption: AES-128

If it's not encrypted, it won't show anything at all.


Use Disk Utility in Lion

New in Lion, Disk Utility now shows if a disk image is encrypted.

  1. Unmount the disk image if it's mounted.

  2. Open Disk Utility and drag the .sparseimage file to the device list on the left side of the Disk Utility window.

  3. Select the .sparseimage in the device list and look at the information area at the bottom of the window. If the disk is encrypted, then that will be indicated under "Disk Write Status".

share|improve this answer
    
Thanks, all great answers, accepting this one as it has more than one way. –  Mark Theunissen Oct 6 '11 at 10:06
add comment

from the command line you can use 'hdiutil isencrypted {image-name}'.

bash-3.2$ hdiutil isencrypted unencrypted.sparseimage
encrypted: NO
bash-3.2$ hdiutil isencrypted encrypted.sparseimage
encrypted: YES
blocksize: 512
uuid: FC3C26ED-3056-4F98-8248-DD2F16B39357
private-key-count: 0
passphrase-count: 1
max-key-count: 1
version: 2
bash-3.2$
share|improve this answer
    
:-) You beat me by a few seconds here... –  patrix Oct 5 '11 at 16:58
add comment

hdiutil isencrypted <image-name> will do the trick.

From the hdiutil(1) man page :

isencrypted image: print a line indicating whether image is encrypted. If it is, additional details are printed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.