We propose an image encryption scheme that brings into play a technique using a triplet of functions to manipulate complex-valued functions. Optical cryptosystems using this method are an easier approach toward the ciphertext generation that avoids the use of holographic setup to record phase. The features of this method were shown in the context of double random phase encoding and phase-truncated Fourier transform-based cryptosystems using gyrator transform. In the first step, the complex function is split into two matrices. These matrices are separated, so they contain the real and imaginary parts. In the next step, these two matrices and a random distribution function are acted upon by one of the functions in the triplet. During decryption, the other two functions in the triplet help us retrieve the complex-valued function. The simulation results demonstrate the effectiveness of the proposed idea. To check the robustness of the proposed scheme, attack analyses were carried out.