Information encryption with optical technologies has become increasingly important due to remarkable multidimensional capabilities of light fields. However, the optical encryption protocols proposed to date have been primarily based on the first-order field characteristics, such as the optical field amplitude and phase as well as its polarization. As the said first-order characteristics of light fields are strongly affected by interference effects, the conventional encoding protocols become quite unstable during light propagation and interaction with the matter. Here, we introduce an alternative optical encryption protocol whereby the information is encoded into the spatial coherence distribution of a structured random light beam via a generalized van Cittert--Zernike theorem. We show that the proposed approach has two key advantages over its conventional counterparts. First, the complexity of measuring the spatial coherence distribution of light enhances the encryption protocol security. Second, the relative insensitivity of the second-order statistical characteristics of light to environmental noise makes the protocol robust against the environmental fluctuations, e.g, the atmospheric turbulence. We carry out experiments to demonstrate the feasibility of the coherence-based encryption method with the aid of a fractional Fourier transform. Our results open up a promising avenue for further research into optical encryption in complex environments.