An encryption method combining optical digital holography with digital decryption on computer is proposed, which avoid the precise setup of optical devices. A digital hologram of three-dimensional (3D) object and a hologram of key information are recorded by optical method in the encryption process. The 3D object is reconstructed by filtering in spectrum domain and simple numerical calculation. The quality of reconstructed object is improved by reducing speckle noise. The robustness against occlusion and noise attacks of the system has also been analyzed. Optical experiments results are presented.