Disk Utility for Mac: Protect a disk with a password using Disk Utility
When you format an internal or external volume, you can encrypt and protect the volume with a password. If you encrypt an internal disk, you must enter a password to access the disk and its information. If you encrypt an external device, you must enter the password when you connect the device to your computer.
To encrypt and protect the volume with a password using Disk Utility, you must erase the volume first. If the volume contains files you want to save, be sure to copy them to another volume.
Important: You can encrypt your data without erasing it by turning on FileVault in the Security & Privacy pane of System Preferences. You can also encrypt a disk and protect it with a password without erasing it by Control-clicking the disk in the Finder and choosing “Encrypt [disk name].”
Select the volume in the sidebar, then click the Erase button .
If you’re protecting an external volume, make sure it’s connected to your computer.
Enter a name for the volume.
Click the Format pop-up menu, then choose Mac OS Extended (Journaled, Encrypted).
Enter a password when prompted.
To prevent the erased files from being recovered, click Security Options, use the slider to choose how many times to write over the erased data, then click OK.
Writing over the data three times meets the U.S. Department of Energy standard for securely erasing magnetic media. Writing over the data seven times meets the U.S. Department of Defense 5220-22-M standard.
To change the password for your disk or partition, select it in the sidebar, then choose File > Change Password.