On Mac OS X, Disk Utility provides an option to create a password protected virtual disk image which could be used to place important data files on system or user can burn that image on CD/DVD.
So, in following you can find the method to know that how you can protect your files on Mac by creating a password protected virtual disk image.
How to create password protected virtual disk image
Click on “Finder”.
To launch “Disk Utility” navigate to Applications > Utilities.
Click on New Image.
On following screen fill the information according to your choice but select Encryption: 128-bit AES encryption (recommended) and click Create button at the bottom.
It will prompt for password so enter password and re-type that in Verify field. Un-check the box followed by Remember password in my keychain and press OK.
It will create your virtual disk on desktop with specified name as Personal Disk.dmg. Now double click on it to open.
It’ll ask for Password so provide password and click OK.
On desktop it will mount the Personal Disk Image folder.
So drag your folders or files to this image folder which you want to keep password protected.
To un-mount the created virtual disk, right click on it and press Eject.
Now you can move your Personal Disk.dmg wherever you want on system or burn to a disk.