In the past two decades, generation and encryption of holographic images have been identified as two important areas of investigation in digital holography. The integration of these two technologies has enabled images to be encrypted with more dimensions of freedom on top of simply employing the encryption keys. Despite the moderate success attained to date, and the rapid advancement of computing technology in recent years, the heavy computation load involved in these two processes remains a major bottleneck in the evolution of the digital holography technology. To alleviate this problem, we have proposed a fast and economical solution which is capable of generating, and at the same time encrypting, holograms with numerical means. In our method, the hologram formation mechanism is decomposed into a pair of onedimensional (1D) processes. In the first stage, a given three-dimensional (3D) scene is partitioned into a stack of uniformed spaced horizontal planes and converted into a set of hologram sublines. Next, the sublines are expanded to a hologram by convolving it with a 1D reference signal. To encrypt the hologram, the reference signal is first convolved with a key function in the form of a maximum length sequence (also known as MLS, or M-sequence). The use of a MLS has two advantages. First, an MLS is spectrally flat so that it will not jeopardize the frequency spectrum of the hologram. Second, the autocorrelation function of an MLS is close to a train of Kronecker delta function. As a result, the encrypted hologram can be decoded by correlating it with the same key that is adopted in the encoding process. Experimental results reveal that the proposed method can be applied to generate and encrypt holograms with a small number of computations. In addition, the encrypted hologram can be decoded and reconstructed to the original 3D scene with good fidelity.