A method for optical encryption of three-dimensional (3D) information by use of digital holography is presented. A phase-shifting interferometer records the phase and amplitude information generated by a 3D object at a plane located in the Fresnel diffraction region with an intensity-recording device. Encryption is performed optically by use of the Fresnel diffraction pattern of a random phase code. Images of the 3D object with different perspectives and focused at different planes can be generated digital or optically after decryption with the proper key. Experimental results are presented.